From b9a04176219c146dfa0c43b583163eafa486823e Mon Sep 17 00:00:00 2001 From: bunju20 Date: Tue, 9 Apr 2024 23:31:32 +0900 Subject: [PATCH] =?UTF-8?q?=E2=99=BB=EF=B8=8Frefactor=20:=20#53=20?= =?UTF-8?q?=EC=8B=A4=EC=8B=9C=EA=B0=84=20=EB=B0=9C=EC=9D=8C=ED=85=8C?= =?UTF-8?q?=EC=8A=A4=ED=8A=B8=20=ED=85=8D=EC=8A=A4=ED=8A=B8=20=EC=9E=90?= =?UTF-8?q?=EB=8F=99=EC=82=AD=EC=A0=9C=20=EB=B0=8F=20=EC=96=B8=EC=96=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/bindings/root_binding.dart | 1 - lib/viewModels/realtime/real_create_viewmodel.dart | 3 +++ lib/views/realtime/real_create_script_screen.dart | 9 ++++++--- 3 files changed, 9 insertions(+), 4 deletions(-) diff --git a/lib/bindings/root_binding.dart b/lib/bindings/root_binding.dart index 7468b6d..30f0385 100644 --- a/lib/bindings/root_binding.dart +++ b/lib/bindings/root_binding.dart @@ -14,6 +14,5 @@ class RootBinding extends Bindings { Get.put(HomeViewModel()); Get.put(StudyViewModel()); Get.put(RealCreateViewModel()); - } } diff --git a/lib/viewModels/realtime/real_create_viewmodel.dart b/lib/viewModels/realtime/real_create_viewmodel.dart index 83a10bb..1b816b4 100644 --- a/lib/viewModels/realtime/real_create_viewmodel.dart +++ b/lib/viewModels/realtime/real_create_viewmodel.dart @@ -15,6 +15,9 @@ class RealCreateViewModel extends GetxController { requestPermission(); } + void clearText() { + text.value = ''; + } void toggleRecording() { print("녹음 버튼 클릭" ); if (isRecording.value) { diff --git a/lib/views/realtime/real_create_script_screen.dart b/lib/views/realtime/real_create_script_screen.dart index 7222c28..3379e1b 100644 --- a/lib/views/realtime/real_create_script_screen.dart +++ b/lib/views/realtime/real_create_script_screen.dart @@ -13,7 +13,7 @@ class RealCreateScriptPage extends BaseScreen { return Scaffold( appBar: AppBar( - title: Text('Live Script Title'), + title: Text('live_script_title'.tr), centerTitle: true, leading: IconButton( icon: const Icon(Icons.arrow_back), @@ -29,7 +29,7 @@ class RealCreateScriptPage extends BaseScreen { expands: true, maxLines: null, decoration: InputDecoration( - hintText: 'Voice Recognition', + hintText: 'voice_recognition'.tr, fillColor: Colors.white, filled: true, border: OutlineInputBorder( @@ -53,7 +53,10 @@ class RealCreateScriptPage extends BaseScreen { ), child: InkWell( borderRadius: BorderRadius.circular(40), - onTap: () => speechController.toggleRecording(), + onTap: (){ + speechController.toggleRecording(); + speechController.clearText(); + }, child: Padding( padding: const EdgeInsets.all(20), child: Icon(