From 886199d206b2adadd77b8bcf2ff114812ba0918c Mon Sep 17 00:00:00 2001 From: becooq81 Date: Thu, 16 May 2024 18:37:44 +0900 Subject: [PATCH] feat(prescribed_med): trigger tts if screen reader not used --- .../prescribed_med_recognition_page_widget.dart | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/lib/src/ui/pages/med_recognition/prescribed_med/prescribed_med_recognition_page/prescribed_med_recognition_page_widget.dart b/lib/src/ui/pages/med_recognition/prescribed_med/prescribed_med_recognition_page/prescribed_med_recognition_page_widget.dart index e933344..6690ed6 100644 --- a/lib/src/ui/pages/med_recognition/prescribed_med/prescribed_med_recognition_page/prescribed_med_recognition_page_widget.dart +++ b/lib/src/ui/pages/med_recognition/prescribed_med/prescribed_med_recognition_page/prescribed_med_recognition_page_widget.dart @@ -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'; @@ -22,6 +23,7 @@ class _PrescribedMedRecognitionPageWidgetState extends State(); final StreamController _controller = StreamController(); + final String instPlaceCameraPack = '카메라에서 30cm를 떨어져서 하나의 처방약을 비추고, 뒤집은 후 다시 비춰주세요.'; @override @@ -36,6 +38,9 @@ class _PrescribedMedRecognitionPageWidgetState extends State PrescribedMedRecognitionPageModel()); + if (!PKBAppState().useScreenReader) { + TtsService().speak(instPlaceCameraPack); + } } @@ -103,7 +108,7 @@ class _PrescribedMedRecognitionPageWidgetState extends State