Skip to content

Commit

Permalink
merge
Browse files Browse the repository at this point in the history
  • Loading branch information
bunju20 committed Feb 17, 2024
2 parents cd7e5eb + 797f87c commit ad446d8
Show file tree
Hide file tree
Showing 14 changed files with 324 additions and 259 deletions.
5 changes: 5 additions & 0 deletions assets/translations/en-US.json
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"
}
5 changes: 5 additions & 0 deletions assets/translations/ko-KR.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"language_settings": "언어 설정",
"system_language": "시스템 언어",
"learning_language": "학습 언어"
}
17 changes: 15 additions & 2 deletions ios/Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -709,6 +709,8 @@ PODS:
- nanopb (< 2.30910.0, >= 2.30908.0)
- FirebaseSharedSwift (10.21.0)
- Flutter (1.0.0)
- flutter_localization (0.0.1):
- Flutter
- flutter_native_splash (0.0.1):
- Flutter
- flutter_secure_storage (6.0.0):
Expand Down Expand Up @@ -818,6 +820,9 @@ PODS:
- Flutter
- PromisesObjC (2.3.1)
- RecaptchaInterop (100.0.0)
- shared_preferences_foundation (0.0.1):
- Flutter
- FlutterMacOS
- speech_to_text (0.0.1):
- Flutter
- Try
Expand All @@ -829,12 +834,14 @@ DEPENDENCIES:
- firebase_core (from `.symlinks/plugins/firebase_core/ios`)
- firebase_database (from `.symlinks/plugins/firebase_database/ios`)
- Flutter (from `Flutter`)
- flutter_localization (from `.symlinks/plugins/flutter_localization/ios`)
- flutter_native_splash (from `.symlinks/plugins/flutter_native_splash/ios`)
- flutter_secure_storage (from `.symlinks/plugins/flutter_secure_storage/ios`)
- flutter_sound (from `.symlinks/plugins/flutter_sound/ios`)
- google_sign_in_ios (from `.symlinks/plugins/google_sign_in_ios/darwin`)
- path_provider_foundation (from `.symlinks/plugins/path_provider_foundation/darwin`)
- permission_handler (from `.symlinks/plugins/permission_handler/ios`)
- shared_preferences_foundation (from `.symlinks/plugins/shared_preferences_foundation/darwin`)
- speech_to_text (from `.symlinks/plugins/speech_to_text/ios`)

SPEC REPOS:
Expand Down Expand Up @@ -876,6 +883,8 @@ EXTERNAL SOURCES:
:path: ".symlinks/plugins/firebase_database/ios"
Flutter:
:path: Flutter
flutter_localization:
:path: ".symlinks/plugins/flutter_localization/ios"
flutter_native_splash:
:path: ".symlinks/plugins/flutter_native_splash/ios"
flutter_secure_storage:
Expand All @@ -888,6 +897,8 @@ EXTERNAL SOURCES:
:path: ".symlinks/plugins/path_provider_foundation/darwin"
permission_handler:
:path: ".symlinks/plugins/permission_handler/ios"
shared_preferences_foundation:
:path: ".symlinks/plugins/shared_preferences_foundation/darwin"
speech_to_text:
:path: ".symlinks/plugins/speech_to_text/ios"

Expand All @@ -909,7 +920,8 @@ SPEC CHECKSUMS:
FirebaseFirestore: 21be9ea244830f6cac15464550c2975c43f9dffc
FirebaseFirestoreInternal: 7ac1e0c5b4e75aeb898dfe4b1d6d77abbac9eca3
FirebaseSharedSwift: 19b3f709993d6fa1d84941d41c01e3c4c11eab93
Flutter: f04841e97a9d0b0a8025694d0796dd46242b2854
Flutter: e0871f40cf51350855a761d2e70bf5af5b9b5de7
flutter_localization: f43b18844a2b3d2c71fd64f04ffd6b1e64dd54d4
flutter_native_splash: 52501b97d1c0a5f898d687f1646226c1f93c56ef
flutter_secure_storage: 23fc622d89d073675f2eaa109381aefbcf5a49be
flutter_sound: c60effa2a350fb977885f0db2fbc4c1ad5160900
Expand All @@ -927,9 +939,10 @@ SPEC CHECKSUMS:
permission_handler: ccb20a9fad0ee9b1314a52b70b76b473c5f8dab0
PromisesObjC: c50d2056b5253dadbd6c2bea79b0674bd5a52fa4
RecaptchaInterop: 7d1a4a01a6b2cb1610a47ef3f85f0c411434cb21
shared_preferences_foundation: b4c3b4cddf1c21f02770737f147a3f5da9d39695
speech_to_text: b43a7d99aef037bd758ed8e45d79bbac035d2dfe
Try: 5ef669ae832617b3cee58cb2c6f99fb767a4ff96

PODFILE CHECKSUM: 0b2c97823421f8b156b8e4753a469ac167670df8

COCOAPODS: 1.14.3
COCOAPODS: 1.15.2
5 changes: 5 additions & 0 deletions ios/Runner/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,11 @@
</array>
</dict>
</array>
<key>CFBundleLocalizations</key>
<array>
<string>en</string>
<string>ko</string>
</array>
<key>CFBundleVersion</key>
<string>$(FLUTTER_BUILD_NUMBER)</string>
<key>LSRequiresIPhoneOS</key>
Expand Down
17 changes: 16 additions & 1 deletion lib/main.dart
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import 'package:earlips/firebase_options.dart';
import 'package:easy_localization/easy_localization.dart';
import 'package:firebase_core/firebase_core.dart';
import 'package:flutter/material.dart';
import 'package:flutter_dotenv/flutter_dotenv.dart';
Expand All @@ -9,10 +10,24 @@ void main() async {
/* Open .env file */
await dotenv.load(fileName: "assets/config/.env");
await initializeDateFormatting();
await EasyLocalization.ensureInitialized();

await Firebase.initializeApp(
options: DefaultFirebaseOptions.currentPlatform,
);

runApp(const MainApp(initialRoute: "/"));
runApp(EasyLocalization(
// 지원 언어 리스트
supportedLocales: const [
Locale('ko', 'KR'),
Locale('en', 'US'),
],
//path: 언어 파일 경로
path: 'assets/translations',
//fallbackLocale supportedLocales에 설정한 언어가 없는 경우 설정되는 언어
fallbackLocale: const Locale('en', 'US'),
//startLocale을 지정하면 초기 언어가 설정한 언어로 변경됨
//만일 이 설정을 하지 않으면 OS 언어를 따라 기본 언어가 설정됨
//startLocale: Locale('ko', 'KR')
child: const MainApp(initialRoute: "/")));
}
15 changes: 4 additions & 11 deletions lib/main_app.dart
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
import 'package:earlips/views/profile/profile_account/profile_account_screen.dart';
import 'package:earlips/views/profile/profile_language_setting/profile_language_setting.dart';
import 'package:earlips/views/profile/profile_screen.dart';
import 'package:flutter/material.dart';
import 'package:flutter_localizations/flutter_localizations.dart';
import 'package:flutter_native_splash/flutter_native_splash.dart';
Expand All @@ -9,7 +6,6 @@ import 'package:earlips/bindings/root_binding.dart';
import 'views/root/root_screen.dart';
import 'utilities/app_routes.dart';


class MainApp extends StatelessWidget {
final String initialRoute;

Expand All @@ -32,6 +28,7 @@ class MainApp extends StatelessWidget {
],
supportedLocales: const [
Locale('ko', 'KR'),
Locale('en', 'US'),
],
theme: ThemeData(
useMaterial3: true,
Expand All @@ -43,13 +40,9 @@ class MainApp extends StatelessWidget {
getPages: [
GetPage(
name: '/', page: () => const RootScreen(), binding: RootBinding()),
// binding:
GetPage(name: '/profile', page: () => const ProfileScreen()),
GetPage(
name: '/profile/account', page: () => const ProfileAccountScreen()),
GetPage(
name: '/profile/language-setting',
page: () => const ProfileLanguageScreen()),
Routes.routes[1],
Routes.routes[2],
Routes.routes[3],
],
);
}
Expand Down
28 changes: 26 additions & 2 deletions lib/utilities/app_routes.dart
Original file line number Diff line number Diff line change
@@ -1,13 +1,37 @@
// ignore_for_file: constant_identifier_names
import 'package:earlips/views/home/home_screen.dart';
import 'package:earlips/views/profile/profile_account/profile_account_screen.dart';
import 'package:earlips/views/profile/profile_language_setting/profile_language_setting.dart';
import 'package:earlips/views/profile/profile_screen.dart';
import 'package:get/get.dart';


abstract class Routes {
static const ROOT = '/';
static const HOME = '/home';
static const SETTING = '/setting';
static const ONBOARDING = '/onboarding';
static const PROFILE = '/profile';
static const PROFILE_ACCOUNT = '/profile/account';
static const PROFILE_LANGUAGE_SETTING = '/profile/language-setting';
static const STUDY = '/study';

}
static final routes = [
GetPage(
name: HOME,
page: () => const HomeScreen(),
),
GetPage(
name: PROFILE,
page: () => const ProfileScreen(),
),
GetPage(
name: PROFILE_ACCOUNT,
page: () => const ProfileAccountScreen(),
),
GetPage(
name: PROFILE_LANGUAGE_SETTING,
page: () => const ProfileLanguageScreen(),
),
// 다른 라우트들도 이곳에 추가할 수 있습니다.
];
}
2 changes: 1 addition & 1 deletion lib/views/base/base_screen.dart
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ abstract class BaseScreen<T extends GetxController> extends GetView<T> {

// SafeArea의 위 부분을 설정할지 여부를 정의하는 메서드
@protected
bool get setTopSafeArea => true;
bool get setTopSafeArea => false;

// AppBar를 구성하는 메서드
@protected
Expand Down
Loading

0 comments on commit ad446d8

Please sign in to comment.