Skip to content

Commit

Permalink
✨Feat: 문장 페이지
Browse files Browse the repository at this point in the history
  • Loading branch information
seochan99 committed Feb 20, 2024
1 parent 692a44f commit 634f3fa
Show file tree
Hide file tree
Showing 5 changed files with 73 additions and 11 deletions.
12 changes: 2 additions & 10 deletions ios/Podfile
Original file line number Diff line number Diff line change
Expand Up @@ -41,14 +41,6 @@ post_install do |installer|
installer.pods_project.targets.each do |target|
flutter_additional_ios_build_settings(target)
target.build_configurations.each do |config|

# You can enable the permissions needed here. For example to enable camera
# permission, just remove the `#` character in front so it looks like this:
#
# ## dart: PermissionGroup.camera
# 'PERMISSION_CAMERA=1'
#
# Preprocessor definitions can be found at: https://github.com/Baseflow/flutter-permission-handler/blob/master/permission_handler_apple/ios/Classes/PermissionHandlerEnums.h
config.build_settings['GCC_PREPROCESSOR_DEFINITIONS'] ||= [
'$(inherited)',

Expand All @@ -67,8 +59,8 @@ post_install do |installer|
## dart: PermissionGroup.camera
# 'PERMISSION_CAMERA=1',

## dart: PermissionGroup.microphone
# 'PERMISSION_MICROPHONE=1',
# dart: PermissionGroup.microphone
'PERMISSION_MICROPHONE=1',

## dart: PermissionGroup.speech
# 'PERMISSION_SPEECH_RECOGNIZER=1',
Expand Down
8 changes: 7 additions & 1 deletion ios/Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -634,6 +634,8 @@ PODS:
- AppAuth/Core (1.6.2)
- AppAuth/ExternalUserAgent (1.6.2):
- AppAuth/Core
- audioplayers_darwin (0.0.1):
- Flutter
- BoringSSL-GRPC (0.0.24):
- BoringSSL-GRPC/Implementation (= 0.0.24)
- BoringSSL-GRPC/Interface (= 0.0.24)
Expand Down Expand Up @@ -840,6 +842,7 @@ PODS:
- FlutterMacOS

DEPENDENCIES:
- audioplayers_darwin (from `.symlinks/plugins/audioplayers_darwin/ios`)
- cloud_firestore (from `.symlinks/plugins/cloud_firestore/ios`)
- firebase_auth (from `.symlinks/plugins/firebase_auth/ios`)
- firebase_core (from `.symlinks/plugins/firebase_core/ios`)
Expand Down Expand Up @@ -887,6 +890,8 @@ SPEC REPOS:
- Try

EXTERNAL SOURCES:
audioplayers_darwin:
:path: ".symlinks/plugins/audioplayers_darwin/ios"
cloud_firestore:
:path: ".symlinks/plugins/cloud_firestore/ios"
firebase_auth:
Expand Down Expand Up @@ -923,6 +928,7 @@ EXTERNAL SOURCES:
SPEC CHECKSUMS:
abseil: 926fb7a82dc6d2b8e1f2ed7f3a718bce691d1e46
AppAuth: 3bb1d1cd9340bd09f5ed189fb00b1cc28e1e8570
audioplayers_darwin: 877d9a4d06331c5c374595e46e16453ac7eafa40
BoringSSL-GRPC: 3175b25143e648463a56daeaaa499c6cb86dad33
cloud_firestore: ba576bee785a05ff952e4da7fa4e23c196917436
Firebase: 10c8cb12fb7ad2ae0c09ffc86cd9c1ab392a0031
Expand Down Expand Up @@ -964,6 +970,6 @@ SPEC CHECKSUMS:
Try: 5ef669ae832617b3cee58cb2c6f99fb767a4ff96
video_player_avfoundation: 02011213dab73ae3687df27ce441fbbcc82b5579

PODFILE CHECKSUM: 0b2c97823421f8b156b8e4753a469ac167670df8
PODFILE CHECKSUM: 163f6f9d5628ee98843cfda3ba4b8cb24bfcad1a

COCOAPODS: 1.15.2
3 changes: 3 additions & 0 deletions ios/Runner.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -476,6 +476,7 @@
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
MTL_ENABLE_DEBUG_INFO = NO;
OTHER_LDFLAGS = "";
SDKROOT = iphoneos;
SUPPORTED_PLATFORMS = iphoneos;
TARGETED_DEVICE_FAMILY = "1,2";
Expand Down Expand Up @@ -605,6 +606,7 @@
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
MTL_ENABLE_DEBUG_INFO = YES;
ONLY_ACTIVE_ARCH = YES;
OTHER_LDFLAGS = "";
SDKROOT = iphoneos;
TARGETED_DEVICE_FAMILY = "1,2";
};
Expand Down Expand Up @@ -653,6 +655,7 @@
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
MTL_ENABLE_DEBUG_INFO = NO;
OTHER_LDFLAGS = "";
SDKROOT = iphoneos;
SUPPORTED_PLATFORMS = iphoneos;
SWIFT_COMPILATION_MODE = wholemodule;
Expand Down
6 changes: 6 additions & 0 deletions lib/utilities/base/supported_locale.dart
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
];
55 changes: 55 additions & 0 deletions lib/views/word/widget/word_sentence_widget.dart
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,
),
),
],
),
),
);
}
}

0 comments on commit 634f3fa

Please sign in to comment.