-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'GDSC-DGU:develop' into develop
- Loading branch information
Showing
13 changed files
with
123 additions
and
80 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
{ | ||
"language_settings": "Language Settings", | ||
"system_language": "System Language", | ||
"learning_language": "Learning Language" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
{ | ||
"language_settings": "언어 설정", | ||
"system_language": "시스템 언어", | ||
"learning_language": "학습 언어" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
import 'package:flutter/material.dart'; | ||
|
||
const supportedLocale = [ | ||
Locale.fromSubtags(languageCode: 'ko'), // English | ||
Locale.fromSubtags(languageCode: 'us'), // German | ||
]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
// word_sentence_widget.dart | ||
import 'dart:io'; | ||
|
||
import 'package:earlips/models/word_data_model.dart'; | ||
import 'package:earlips/viewModels/record/record_viewmodel.dart'; | ||
import 'package:earlips/viewModels/word/word_viewmodel.dart'; | ||
import 'package:flutter/material.dart'; | ||
import 'package:flutter_sound/flutter_sound.dart'; | ||
import 'package:permission_handler/permission_handler.dart'; | ||
import 'package:get/get.dart'; | ||
|
||
class WordSentenceWidget extends StatelessWidget { | ||
final List<WordData> wordDataList; | ||
const WordSentenceWidget({super.key, required this.wordDataList}); | ||
|
||
@override | ||
Widget build(BuildContext context) { | ||
final wordViewModel = Get.find<WordViewModel>(); // Access your ViewModel! | ||
return GetBuilder<RecordViewModel>( | ||
init: RecordViewModel(), | ||
builder: (viewModel) => Center( | ||
child: Column( | ||
children: [ | ||
const Text('WordSentenceWidget'), | ||
StreamBuilder<RecordingDisposition>( | ||
stream: viewModel.recorder.onProgress, | ||
builder: (context, snapshot) { | ||
final disposition = snapshot.hasData | ||
? snapshot.data!.duration | ||
: Duration.zero; | ||
|
||
return Text('Recorder: ${disposition.inSeconds}s'); | ||
}), | ||
ElevatedButton( | ||
onPressed: () async { | ||
if (viewModel.recorder.isRecording) { | ||
await viewModel.stopRecording( | ||
wordDataList[wordViewModel.currentIndex.value] | ||
.wordCard | ||
.word); | ||
} else { | ||
await viewModel.startRecording(); | ||
} | ||
}, | ||
child: Icon( | ||
viewModel.recorder.isRecording ? Icons.stop : Icons.mic, | ||
size: 40, | ||
), | ||
), | ||
], | ||
), | ||
), | ||
); | ||
} | ||
} |
Oops, something went wrong.