Skip to content

Commit

Permalink
feat(prescribed_med): trigger tts if screen reader not used
Browse files Browse the repository at this point in the history
  • Loading branch information
becooq81 committed May 16, 2024
1 parent 255bb3c commit 886199d
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import 'dart:async';

import '../../../../../core/pillkaboo_util.dart';
import '../../../../widgets/index.dart' as widgets;
import '../../../../../app/tts/tts_service.dart';

import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
Expand All @@ -22,6 +23,7 @@ class _PrescribedMedRecognitionPageWidgetState extends State<PrescribedMedRecogn
late PrescribedMedRecognitionPageModel _model;
final scaffoldKey = GlobalKey<ScaffoldState>();
final StreamController<bool> _controller = StreamController();
final String instPlaceCameraPack = '카메라에서 30cm를 떨어져서 하나의 처방약을 비추고, 뒤집은 후 다시 비춰주세요.';


@override
Expand All @@ -36,6 +38,9 @@ class _PrescribedMedRecognitionPageWidgetState extends State<PrescribedMedRecogn
});
PKBAppState().slotOfDay = "";
_model = createModel(context, () => PrescribedMedRecognitionPageModel());
if (!PKBAppState().useScreenReader) {
TtsService().speak(instPlaceCameraPack);
}
}


Expand Down Expand Up @@ -103,7 +108,7 @@ class _PrescribedMedRecognitionPageWidgetState extends State<PrescribedMedRecogn
color: PKBAppState().tertiaryColor,
child: Semantics(
container: true,
label: '카메라에서 30cm를 떨어져서 하나의 처방약을 비추고, 뒤집은 후 다시 비춰주세요.',
label: instPlaceCameraPack,
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Expand Down

0 comments on commit 886199d

Please sign in to comment.