diff --git a/lib/app/app.router.dart b/lib/app/app.router.dart index 7fcdcb3..a8d7e22 100644 --- a/lib/app/app.router.dart +++ b/lib/app/app.router.dart @@ -475,16 +475,16 @@ class StackedRouter extends _i1.RouterBase { _i18.LearnModuleView: (data) { final args = data.getArgs(nullOk: false); return _i37.MaterialPageRoute( - builder: (context) => - _i18.LearnModuleView(key: args.key, course: args.course), + builder: (context) => _i18.LearnModuleView( + key: args.key, first: args.first, course: args.course), settings: data, ); }, _i19.LearnLessonView: (data) { final args = data.getArgs(nullOk: false); return _i37.MaterialPageRoute( - builder: (context) => - _i19.LearnLessonView(key: args.key, module: args.module), + builder: (context) => _i19.LearnLessonView( + key: args.key, first: args.first, module: args.module), settings: data, ); }, @@ -628,7 +628,8 @@ class StackedRouter extends _i1.RouterBase { _i35.LearnCourseView: (data) { final args = data.getArgs(nullOk: false); return _i37.MaterialPageRoute( - builder: (context) => _i35.LearnCourseView(key: args.key, id: args.id), + builder: (context) => + _i35.LearnCourseView(key: args.key, id: args.id, first: args.first), settings: data, ); }, @@ -1009,54 +1010,60 @@ class LoginViewArguments { class LearnModuleViewArguments { const LearnModuleViewArguments({ this.key, + required this.first, required this.course, }); final _i37.Key? key; + final bool first; + final _i38.LearnCourse course; @override String toString() { - return '{"key": "$key", "course": "$course"}'; + return '{"key": "$key", "first": "$first", "course": "$course"}'; } @override bool operator ==(covariant LearnModuleViewArguments other) { if (identical(this, other)) return true; - return other.key == key && other.course == course; + return other.key == key && other.first == first && other.course == course; } @override int get hashCode { - return key.hashCode ^ course.hashCode; + return key.hashCode ^ first.hashCode ^ course.hashCode; } } class LearnLessonViewArguments { const LearnLessonViewArguments({ this.key, + required this.first, required this.module, }); final _i37.Key? key; + final bool first; + final _i39.LearnModule module; @override String toString() { - return '{"key": "$key", "module": "$module"}'; + return '{"key": "$key", "first": "$first", "module": "$module"}'; } @override bool operator ==(covariant LearnLessonViewArguments other) { if (identical(this, other)) return true; - return other.key == key && other.module == module; + return other.key == key && other.first == first && other.module == module; } @override int get hashCode { - return key.hashCode ^ module.hashCode; + return key.hashCode ^ first.hashCode ^ module.hashCode; } } @@ -1486,26 +1493,29 @@ class LearnCourseViewArguments { const LearnCourseViewArguments({ this.key, required this.id, + required this.first, }); final _i37.Key? key; final int id; + final bool first; + @override String toString() { - return '{"key": "$key", "id": "$id"}'; + return '{"key": "$key", "id": "$id", "first": "$first"}'; } @override bool operator ==(covariant LearnCourseViewArguments other) { if (identical(this, other)) return true; - return other.key == key && other.id == id; + return other.key == key && other.id == id && other.first == first; } @override int get hashCode { - return key.hashCode ^ id.hashCode; + return key.hashCode ^ id.hashCode ^ first.hashCode; } } @@ -1801,6 +1811,7 @@ extension NavigatorStateExtension on _i47.NavigationService { Future navigateToLearnModuleView({ _i37.Key? key, + required bool first, required _i38.LearnCourse course, int? routerId, bool preventDuplicates = true, @@ -1809,7 +1820,8 @@ extension NavigatorStateExtension on _i47.NavigationService { transition, }) async { return navigateTo(Routes.learnModuleView, - arguments: LearnModuleViewArguments(key: key, course: course), + arguments: + LearnModuleViewArguments(key: key, first: first, course: course), id: routerId, preventDuplicates: preventDuplicates, parameters: parameters, @@ -1818,6 +1830,7 @@ extension NavigatorStateExtension on _i47.NavigationService { Future navigateToLearnLessonView({ _i37.Key? key, + required bool first, required _i39.LearnModule module, int? routerId, bool preventDuplicates = true, @@ -1826,7 +1839,8 @@ extension NavigatorStateExtension on _i47.NavigationService { transition, }) async { return navigateTo(Routes.learnLessonView, - arguments: LearnLessonViewArguments(key: key, module: module), + arguments: + LearnLessonViewArguments(key: key, first: first, module: module), id: routerId, preventDuplicates: preventDuplicates, parameters: parameters, @@ -2107,6 +2121,7 @@ extension NavigatorStateExtension on _i47.NavigationService { Future navigateToLearnCourseView({ _i37.Key? key, required int id, + required bool first, int? routerId, bool preventDuplicates = true, Map? parameters, @@ -2114,7 +2129,7 @@ extension NavigatorStateExtension on _i47.NavigationService { transition, }) async { return navigateTo(Routes.learnCourseView, - arguments: LearnCourseViewArguments(key: key, id: id), + arguments: LearnCourseViewArguments(key: key, id: id, first: first), id: routerId, preventDuplicates: preventDuplicates, parameters: parameters, @@ -2399,6 +2414,7 @@ extension NavigatorStateExtension on _i47.NavigationService { Future replaceWithLearnModuleView({ _i37.Key? key, + required bool first, required _i38.LearnCourse course, int? routerId, bool preventDuplicates = true, @@ -2407,7 +2423,8 @@ extension NavigatorStateExtension on _i47.NavigationService { transition, }) async { return replaceWith(Routes.learnModuleView, - arguments: LearnModuleViewArguments(key: key, course: course), + arguments: + LearnModuleViewArguments(key: key, first: first, course: course), id: routerId, preventDuplicates: preventDuplicates, parameters: parameters, @@ -2416,6 +2433,7 @@ extension NavigatorStateExtension on _i47.NavigationService { Future replaceWithLearnLessonView({ _i37.Key? key, + required bool first, required _i39.LearnModule module, int? routerId, bool preventDuplicates = true, @@ -2424,7 +2442,8 @@ extension NavigatorStateExtension on _i47.NavigationService { transition, }) async { return replaceWith(Routes.learnLessonView, - arguments: LearnLessonViewArguments(key: key, module: module), + arguments: + LearnLessonViewArguments(key: key, first: first, module: module), id: routerId, preventDuplicates: preventDuplicates, parameters: parameters, @@ -2705,6 +2724,7 @@ extension NavigatorStateExtension on _i47.NavigationService { Future replaceWithLearnCourseView({ _i37.Key? key, required int id, + required bool first, int? routerId, bool preventDuplicates = true, Map? parameters, @@ -2712,7 +2732,7 @@ extension NavigatorStateExtension on _i47.NavigationService { transition, }) async { return replaceWith(Routes.learnCourseView, - arguments: LearnCourseViewArguments(key: key, id: id), + arguments: LearnCourseViewArguments(key: key, id: id, first: first), id: routerId, preventDuplicates: preventDuplicates, parameters: parameters, diff --git a/lib/services/authentication_service.dart b/lib/services/authentication_service.dart index e0ffc2f..9d04656 100644 --- a/lib/services/authentication_service.dart +++ b/lib/services/authentication_service.dart @@ -23,7 +23,7 @@ class AuthenticationService with ListenableServiceMixin { // Initialization AuthenticationService() { - listenToReactiveValues([_user,_state, _localizationService]); + listenToReactiveValues([_user, _state, _localizationService]); } // Logout state @@ -31,7 +31,6 @@ class AuthenticationService with ListenableServiceMixin { StateObjects get state => _state; - // Check user logged in Future userLoggedIn() async { if (await _secureService.getString('userId') != null) { @@ -202,7 +201,6 @@ class AuthenticationService with ListenableServiceMixin { await setFirstTimeInstall(firstTimeInstall); await _secureService.setString('language', language); - _state = StateObjects.none; notifyListeners(); } diff --git a/lib/services/google_auth_service.dart b/lib/services/google_auth_service.dart index d97e083..73bae74 100644 --- a/lib/services/google_auth_service.dart +++ b/lib/services/google_auth_service.dart @@ -29,7 +29,6 @@ class GoogleAuthService with ListenableServiceMixin { _googleUser ??= await _signIn.authenticate(scopeHint: ['email', 'profile']); - }); notifyListeners(); } catch (e) { diff --git a/lib/services/learn_service.dart b/lib/services/learn_service.dart index 71f0597..a280200 100644 --- a/lib/services/learn_service.dart +++ b/lib/services/learn_service.dart @@ -58,8 +58,6 @@ class LearnService with ListenableServiceMixin { List get lessons => _lessons; - - // Learn programs Future refreshObject(String url) async { Map data = {'reference': url}; diff --git a/lib/ui/common/app_constants.dart b/lib/ui/common/app_constants.dart index 50bb114..e5af44d 100644 --- a/lib/ui/common/app_constants.dart +++ b/lib/ui/common/app_constants.dart @@ -124,5 +124,4 @@ String kTelegramSupportLink = 'https://t.me/yimaruacademy2026'; String kErrorUrl = 'https://api.yimaruacademy.com/payment/error'; -String kSuccessUrl = - 'https://api.yimaruacademy.com/payment/success'; +String kSuccessUrl = 'https://api.yimaruacademy.com/payment/success'; diff --git a/lib/ui/common/translations/codegen_loader.g.dart b/lib/ui/common/translations/codegen_loader.g.dart index 83d4d43..4290513 100644 --- a/lib/ui/common/translations/codegen_loader.g.dart +++ b/lib/ui/common/translations/codegen_loader.g.dart @@ -6,7 +6,7 @@ import 'dart:ui'; import 'package:easy_localization/easy_localization.dart' show AssetLoader; -class CodegenLoader extends AssetLoader{ +class CodegenLoader extends AssetLoader { const CodegenLoader(); @override @@ -14,399 +14,429 @@ class CodegenLoader extends AssetLoader{ return Future.value(mapLocales[locale.toString()]); } - static const Map _am = { - "loading": "በመጫን ላይ", - "welcome_back": "እንኳን በደህና ተመለሱ", - "checking_user_info": "የተጠቃሚ መረጃን በማረጋገጥ ላይ", - "dont_have_account": "መለያ የለዎትም?", - "email": "ኢሜይል", - "password": "የይለፍ ቃል", - "forgot_password": "የይለፍ ቃል ረሱ?", - "cont": "ቀጥል", - "register": "ይመዝገቡ", - "login_with_google": "በጉግል ይግቡ", - "or": "ወይም", - "login_with_phone": "በስልክ ቁጥር ይግቡ", - "create_account": "አዲስ መለያ ይፍጠሩ", - "already_have_account": "መለያ አለዎት?", - "login": " ይግቡ ", - "register_with_google": "በጉግል ይመዝገቡ", - "register_with_phone": "በስልክ ቁጥር ይመዝገቡ", - "enter_phone_number": "የስልክ ቁጥርዎን ያስገቡ። የማረጋገጫ ኮድ እንልክልዎታለን።", - "login_with_email": "በኢሜይል ይግቡ", - "create_password": "የይለፍ ቃል ይፍጠሩ", - "confirm_password": "የይለፍ ቃል ያረጋግጡ", - "eight_character_minimum": "ቢያንስ 8 ፊደላት", - "password_match": "የይለፍ ቃሉ ተመሳስሏል", - "sign_up_agreement": "‘ይመዝገቡ’ የሚለውን ሲጫኑ በ‘አገልግሎት ውሎች’ እና ‘በግላዊነት ፖሊሲ’ ይስማማሉ።", - "terms_of_services": "የአገልግሎት ውሎች", - "and": "እና", - "privacy_policy": "የግላዊነት ፖሊሲ", - "register_with_email": "በኢሜል ይመዝገቡ", - "verification_code": "የማረጋገጫ ኮድ", - "resend_code": "ኮዱን እንደገና ላክ", - "code_sent_to_phone": "ኮዱ ወደ ስልክ ቁጥርዎ ተልኳል", - "code_sent_to_email": "ኮዱ ወደ ኢሜል ተልኳል", - "resend_code_in": "ኮዱን እንደገና ለመላክ የቀረው ጊዜ", - "reset_password": " የይለፍ ቃልን ይቀይሩ", - "enter_email_reset_code": "ኢሜይልዎን ያስገቡ። የይለፍ ቃል መለወጫ ኮድ እንልክልዎታለን።", - "please_wait": "እባክዎ ይጠብቁ", - "reset_code_sent": "የመቀየሪያ ኮድ በተሳካ ሁኔታ ተልኳል", - "reset_code": " የመቀየሪያ ኮድ ", - "new_password": "አዲስ የይለፍ ቃል", - "logged_in_successfully": "በተሳካ ሁኔታ ገብተዋል", - "view_course": " ኮርሱን ይመልከቱ", - "continue_learning": "መማርን ይቀጥሉ", - "start_learning": "ትምህርትን ይጀምሩ", - "completed": "ተጠናቋል", - "take_practice": "ልምምድ ያድርጉ", - "your_current_level": "የአሁኑ ደረጃዎ", - "overall_progress": "አጠቃላይ እድገት", - "great_work": "በርቱ! በጣም ጥሩ እየሰሩ ነው", - "view_module": "ሞጁሉን ይመልከቱ", - "progress": "እድገት", - "keep_going": "ይቀጥሉ - ከግማሽ በላይ ጨርሰዋል ", - "lessons_in_module": "በዚህ ሞጁል ውስጥ ያሉ ትምህርቶች ", - "practice": "ልምምድ", - "start": "ጀምር", - "in_progress": "በሂደት ላይ", - "hello": "ሰላም", - "ready_to_learn": " ዛሬ እንግሊዝኛ ለመማር ተዘጋጅተዋል? ", - "learn": "ይማሩ ", - "course": "ኮርስ", - "profile": " ፕሮፋይል ", - "speaking_partner": "የንግግር ጓደኛ", - "practice_what_you_learned": "አሁን የተማሩትን እንለማመድ", - "practice_questions": "ጥቂት ጥያቄዎችን እጠይቃለሁ እና መልስ መስጠት ይችላሉ", - "start_practice": "ልምምድ ጀምር", - "almost_there": "ሊጨርሱ ተቃርበዋል", - "finish_session": "እድገትዎን ለማየት ክፍለ ጊዜውን ያጠናቅቁ", - "continue_practice": "ልምምዱን ይቀጥሉ", - "end_session": "ክፍለ ጊዜውን ያብቁ ", - "tap_start_to_listen": "ለማዳመጥ የጀምር ቁልፉን ይጫኑ", - "practice_speaking": "ንግግርን ይለማመዱ", - "tap_microphone": "ለመናገር ማይክሮፎኑን ይጫኑ", - "reply": "እንደገና አዳምጥ", - "cancel": "ይቅር", - "you_are_speaking": "እየተናገሩ ነው", - "practice_completed": "ልምምዱ ተጠናቅቋል", - "great_improvement": "በዚህኛው በራስ መተማመንዎ ጨምሯል፤ ትልቅ መሻሻል ነው", - "practice_again": "እንደገና ይለማመዱ", - "conversation_review": "የንግግር ግምገማ", - "result": "ውጤት", - "quick_tip": "ጠቃሚ ምክር", - "retry": "እንደገና ይሞክሩ", - "completed_a1": "እንኳን ደስ አለዎት! A1 ደረጃን አጠናቅቀዋል", - "analyzing_speaking": "የንግግር ችሎታዎን እየገመገምን ነው", - "view_profile": "ፕሮፋይሎን ይመልከቱ ", - "hi": "ሰላም", - "edit_profile": "መገለጫ ያስተካክሉ", - "first_name": "የመጀመሪያ ስም", - "last_name": "የአባት ስም", - "gender": "ፆታ", - "male": "ወንድ", - "female": "ሴት", - "phone_number": "የስልክ ቁጥር", - "country": "ሀገር", - "region": "ክልል", - "select_region": "ክልል ይምረጡ", - "enter_your_city": "ከተማዎን ያስገቡ", - "occupation": "የስራ መስክ", - "select_occupation": "ሙያዎን ይምረጡ", - "save_changes": "ለውጦችን ያስቀምጡ", - "my_progress": "የእኔ እድገት", - "track_your_achievement": "ስኬቶችዎን እና ተከታታይ የትምህርት ጉዞዎን ይከታተሉ", - "account_and_privacy": "መለያ እና ግላዊነት", - "manage_settings": "ቅንብሮችን እና የመተግበሪያ ምርጫዎችን ያስተዳድሩ", - "support": "ድጋፍ", - "get_help": "በስልክ ወይም በቴሌግራም እገዛ ያግኙ", - "logout": "ውጣ", - "app_settings": "የመተግበሪያ ቅንብሮች", - "legal_and_information": "ሕጋዊ እና መረጃ", - "change_language": "ቋንቋ ቀይር", - "terms_and_conditions": "ውሎች እና ሁኔታዎች", - "delete_account": "መለያ ሰርዝ", - "language_preference": "የቋንቋ ምርጫ", - "choose_your_language": "ለውጦችን አስቀምጥ", - "switch_language_anytime": "ቋንቋዎችን በማንኛውም ጊዜ መቀየር ይችላሉ", - "need_help": "እገዛ ይፈልጋሉ?", - "call_support": "የስልክ ድጋፍ", - "talk_with_support": "በቀጥታ ከድጋፍ ቡድናችን ጋር ይነጋገሩ", - "telegram_support": "የቴሌግራም ድጋፍ", - "chat_via_telegram": "በቴሌግራም በፍጥነት ይወያዩ", - "call_our_support": "ከ3 ጠዋት እስከ 12 ማታ ድረስ የድጋፍ ቡድናችንን ይደውሉ", - "tap_to_call": "ለመደወል ይንኩ", - "join_telegram": "በቴሌግራም የይማሩ አካዳሚን ይቀላቀሉ", - "connect_with_support_team": "ለፈጣን እርዳታ እና የማህበረሰብ ዝማኔዎች፣ በቴሌግራም ከድጋፍ ቡድናችን ጋር ወዲያውኑ ይገናኙ።", - "open_in_telegram": "በቴሌግራም ይክፈቱ", - "search_for": "ፈልጉት", - "current_level": "የአሁኑ ደረጃ", - "keep_up_the_great_work": "በጣም ጥሩ እየሰራህ ነው! ቀጥልበት፣ አስደናቂ ነህ።", - "no_practice_available": "ምንም ልምምድ አልተገኘም!", - "begin_module_practice": "የሞጁሉን ልምምድ ጀምር", - "lets_practice_lesson": "እንለማመድ", - "lets_quickly_review": "በዚህ ሞጁል ውስጥ የተማርከውን በፍጥነት እንከልስ!", - "lets_practice_module": "አሁን የተማርከውን እንለማመድ!", - "ask_you_few_actions": "ጥቂት ጥያቄዎችን እጠይቅሃለሁ፣ አንተም በተፈጥሮ መልስ ልትሰጥ ትችላለህ።", - "begin_level_practice": "የደረጃ ልምምድን ጀምር", - "lets_practice_course": "የኮርሱን ልምምድ እንለማመድ", - "lets_quick_review": "በዚህ ደረጃ የተማርከውን በፍጥነት እንከልስ!", - "speaking": "እየተናገረ ነው", - "you_have_finished_practice": "ልምምድህን አጠናቀቅህ", - "view_results": "ውጤቶቼን እይ", - "sample_answer": "ናሙና መልስ", - "your_answer": "መልስህ", - "sound_confident": "በዚህ ጊዜ የበለጠ እምነት ያለህ ይመስላል — በጣም ጥሩ መሻሻል ነው!", - "you_have_completed": "አያይ! አጠናቀቅህ", - "yes": "አዎ", - "no": "አይ", - "want_to_quit": "ለመውጣት እርግጠኛ ነህ?", - "required_field": "ይህ መስክ ያስፈልጋል", - "enter_full_name": "ሙሉ ስምህን አስገባ", - "invalid_email": "የማይሰራ የኢሜይል ቅርጸት", - "phone_must_start_with": "የስልክ ቁጥር በ251 መጀመር አለበት", - "phone_must_be": "የስልክ ቁጥር 12 አሃዞች መሆን አለበት", - "what_should_we_call_you": "ምን ብለን እንጠራህ?", - "name_for_personalization": "በመማር ጉዞህ ውስጥ ለግል ለማድረግ ስምህን እንጠቀማለን።", - "choose_your_gender": "ጾታህን ምረጥ", - "gender_for_personalization": "በጾታህ መሰረት የመማር ተሞክሮህን እናበጅለታለን።", - "age_range": "በየትኛው የእድሜ ክልል ውስጥ ነህ?", - "age_for_personalization": "በእድሜህ መሰረት የመማር ተሞክሮህን እናበጅለታለን።", - "educational_background": "አሁን ያለህ የትምህርት ደረጃ ምንድን ነው?", - "education_for_personalization": "ይህ ትምህርቶችን ከልምድህ ጋር እንዲስማሙ ለማድረግ ይረዳናል።", - "your_occupation": "ስራህ ምንድን ነው?", - "occupation_for_personalization": "በስራህ መሰረት የመማር ተሞክሮህን እናበጅለታለን።", - "location": "ከየት ነህ?", - "select_country_region": "አገርህን እና ክልልህን ከተቆልቋይ ዝርዝሩ ምረጥ", - "select_country": "አገር ምረጥ", - "learning_goal": "የመማር ዓላማህን ምረጥ", - "language_goal": "እንግሊዝኛህን ለማሻሻል ዋና ዓላማህ ምንድን ነው?", - "your_goal": "ዓላማህ የመማር ጉዞህን እንዲስማማ ለማድረግ ይረዳናል።", - "write_your_goal": "ዓላማህን ጻፍ…", - "challenge_you_face": "What challenge do you face most with English?", - "evey_one_has_strugle": "ሁሉም ሰው ችግሮች አሉት፣ የአንተን እንጀምር እንፍታ", - "write_your_challenge": "ችግርህን ጻፍ…", - "topic_interest": "በጣም የሚስቡህ ርዕሶች የትኞቹ ናቸው?", - "favourite_topic": "የምትወዳቸው ርዕሶች አስደሳች እና ከሕይወትህ ጋር የተዛመዱ ትምህርቶችን ለመፍጠር ይረዱናል።", - "your_interest": "ፍላጎትህን ጻፍ…", - "want_quick_assessment": "የእንግሊዝኛ ደረጃህን ለማወቅ ፈጣን ግምገማ ትፈልጋለህ?", - "answer_quick_questions": "የእንግሊዝኛ ችሎታህን ለመረዳት ጥቂት ፈጣን ጥያቄዎችን መልስ።", - "skip": "ዝለል", - "finish_level": "ደረጃውን አጠናቅቅ", - "likely_speaker": "አንተ ምናልባት ተናጋሪ ነህ", - "great_job": "በጣም ጥሩ ስራ! ለመሻሻል ቀጣዩ ደረጃህ ይኸው ነው።", - "lets_start_practice": "ልምምድህን እንጀምር", - "welcome_abroad": "እንኳን ደህና መጣህ", - "ready_to_explore": "የግል ትምህርቶችህን ለማሰስ ዝግጁ ነህ።", - "finish": "አጠናቅቅ", - "finish_all_practice_lesson": "ይህን ልምምድ ለመውሰድ የቀድሞውን የትምህርት ልምምድ ያጠናቅቁ", - "finish_all_practice_module": "የሞጁሉን ልምምድ ለመውሰድ የትምህርት ልምምዶችን ያጠናቅቁ", - "finish_all_practice_course": "የኮርሱን ልምምድ ለመውሰድ የሞጁል ልምምዶችን ያጠናቅቁ", - "finish_all_practice_previouse_module": "ይህን ልምምድ ለመውሰድ የቀድሞውን የሞጁል ልምምድ ያጠናቅቁ", - "finish_all_practice_previouse_course": "ይህን ለመውሰድ የቀድሞውን የኮርስ ልምምድ ያጠናቅቁ", - "track_journey": "የትምህርት ጉዞዎን ይከታተሉ እና በጊዜ ሂደት ያሳዩትን እድገት ይመልከቱ።", - "learn_english": "እንግሊዝኛ ይማሩ", - "keep_momentum": "በጣም ጥሩ ስራ! በዚሁ ብርታት ይቀጥሉ።", - "completed_practices": "የተጠናቀቁ ልምምዶች", - "total_practices": "ጠቅላላ ልምምዶች", - "progress_percentage": "የእድገት መቶኛ" -}; -static const Map _en = { - "loading": "Loading", - "welcome_back": "Welcome back", - "checking_user_info": "Checking user info", - "dont_have_account": "Don't have an account?", - "email": "Email", - "password": "Password", - "forgot_password": "Forgot password?", - "cont": "Continue", - "register": "Register", - "login_with_google": "Login with Google", - "or": "Or", - "login_with_phone": "Login with phone number", - "create_account": "Create an account", - "already_have_account": "Already have an account?", - "login": "Login", - "register_with_google": "Register with Google", - "register_with_phone": "Register with phone number", - "enter_phone_number": "Enter your phone number. We will send you a confirmation code there.", - "login_with_email": "Login with email", - "create_password": "Create password", - "confirm_password": "Confirm password", - "eight_character_minimum": "8 characters minimum", - "password_match": "password match", - "sign_up_agreement": "By clicking ‘Sign Up’, you agree to our ‘Terms of Service’ and ‘Privacy Policy’", - "terms_of_services": "Terms of Service", - "and": "and", - "privacy_policy": "Privacy Policy", - "register_with_email": "Register with email", - "verification_code": "Verification Code", - "resend_code": "Resend Code", - "code_sent_to_phone": "Code sent to your number", - "code_sent_to_email": "Code sent to your email", - "resend_code_in": "Resend code in", - "reset_password": "Reset Password", - "enter_email_reset_code": "Enter your email. We will send you a reset code.", - "please_wait": "Please wait", - "reset_code_sent": "Reset code sent successfully", - "reset_code": "Reset code", - "new_password": "New password", - "logged_in_successfully": "Logged in successfully", - "continue_learning": "Continue Learning", - "start_learning": "Start Learning", - "completed": "Completed", - "view_course": "View course", - "take_practice": "Take practice", - "your_current_level": "Your current level", - "overall_progress": "Overall progress", - "great_work": "Keep up the great work! You're doing amazing", - "view_module": "View module", - "progress": "Progress", - "keep_going": "Let's keep going - you're more than half there", - "lessons_in_module": "Lessons in this module", - "practice": "Practice", - "start": "Start", - "in_progress": "In Progress", - "hello": "Hello", - "ready_to_learn": "Ready to keep learning English today", - "learn": "Learn", - "course": "Course", - "profile": "Profile", - "speaking_partner": "Speaking partner", - "practice_what_you_learned": "Let's practice what you just learnt", - "practice_questions": "I will ask you a few questions and you can respond", - "start_practice": "Start practice", - "almost_there": "You're almost there", - "finish_session": "Finish the session to see your progress", - "continue_practice": "Continue practice", - "end_session": "End session", - "tap_start_to_listen": "Tap the start button to listen", - "practice_speaking": "Practice speaking", - "tap_microphone": "Tap the microphone to speak", - "reply": "Reply", - "cancel": "Cancel", - "you_are_speaking": "You're speaking", - "practice_completed": "Practice completed!", - "great_improvement": "You sound more confident this time, great improvement", - "practice_again": "Practice again", - "conversation_review": "Conversation review", - "result": "Result", - "quick_tip": "Quick tip", - "retry": "Retry", - "completed_a1": "Yay, you've completed A1", - "analyzing_speaking": "We're now analyzing your speaking skill", - "view_profile": "View profile", - "hi": "Hi", - "edit_profile": "Edit profile", - "first_name": "First name", - "last_name": "Last name", - "gender": "Gender", - "male": "Male", - "female": "Female", - "phone_number": "Phone number", - "country": "Country", - "region": "Region", - "select_region": "Select region", - "enter_your_city": "Enter your city", - "occupation": "Occupation", - "select_occupation": "Select occupation", - "save_changes": "Save changes", - "my_progress": "My progress", - "track_your_achievement": "Track your achievements and learning streak", - "account_and_privacy": "Account & Privacy", - "manage_settings": "Manage settings and app preference", - "support": "Support", - "get_help": "Get help through phone or Telegram", - "logout": "Logout", - "app_settings": "App settings", - "legal_and_information": "Legal & Information", - "change_language": "Change language", - "terms_and_conditions": "Terms & Conditions", - "delete_account": "Delete account", - "language_preference": "Language preference", - "choose_your_language": "Choose your language", - "switch_language_anytime": "You can switch languages anytime", - "need_help": "Need help?", - "call_support": "Call support", - "talk_with_support": "Talk with our support team directly", - "telegram_support": "Telegram support", - "chat_via_telegram": "Chat instantly via Telegram", - "call_our_support": "Call our support team between 9 AM - 6 PM", - "tap_to_call": "Tap to call", - "join_telegram": "Join Yimaru Academy on Telegram", - "connect_with_support_team": "Connect with our support team instantly on Telegram for quick assistance and community updates", - "open_in_telegram": "Open in Telegram", - "search_for": "Search for", - "current_level": "Current Level", - "keep_up_the_great_work": "Keep up the great work! You're doing amazing.", - "no_practice_available": "No practice available!", - "begin_module_practice": "Begin Module Practice", - "lets_practice_lesson": "Let’s Practice", - "lets_quickly_review": "Let’s quickly review what you’ve learned in this module!", - "lets_practice_module": "Let's practice what you just learnt!", - "ask_you_few_actions": "I’ll ask you a few questions, and you can respond naturally.", - "begin_level_practice": "Begin Level Practice", - "lets_practice_course": "Let’s Practice Course", - "lets_quick_review": "Let’s quickly review what you’ve learned in this level!", - "speaking": "is speaking...", - "you_have_finished_practice": "You have finished your practice", - "view_results": "View My Results", - "sample_answer": "Sample Answer", - "your_answer": "Your Answer", - "sound_confident": "You sound more confident this time - great improvement!", - "you_have_completed": "Yay, you’ve completed", - "yes": "Yes", - "no": "No", - "want_to_quit": "Are you sure you want to quit?", - "required_field": "The field is required", - "enter_full_name": "Enter your full name", - "invalid_email": "Invalid email format", - "phone_must_start_with": "Phone number must start with 251", - "phone_must_be": "Phone number must be 12 digits", - "what_should_we_call_you": "What should we call you?", - "name_for_personalization": "We’ll use your name to personalize your learning journey.", - "choose_your_gender": "Choose your gender?", - "gender_for_personalization": "We’ll personalize your learning experience based on your gender.", - "age_range": "Which age range are you in?", - "age_for_personalization": "We’ll personalize your learning experience based on your age.", - "educational_background": "What’s your current educational level?", - "education_for_personalization": "This helps us tailor your lessons to your experience.", - "your_occupation": "What’s your occupation?", - "occupation_for_personalization": "We’ll personalize your learning experience based on your occupation.", - "location": "Where are you from?", - "select_country_region": "Select your country and region from the dropdown", - "select_country": "Select country", - "learning_goal": "Choose your learning goal.", - "language_goal": "What’s your main goal for improving your English?", - "your_goal": "Your goal helps us tailor your learning journey.", - "write_your_goal": "Write your goal…", - "challenge_you_face": "What challenge do you face most with English?", - "evey_one_has_strugle": "Everyone has struggles, let’s start fixing yours", - "write_your_challenge": "Write your challenge…", - "topic_interest": "Which topics interest you most?", - "favourite_topic": "Your favorite topics help us create fun, relatable lessons.", - "your_interest": "Write your interest…", - "want_quick_assessment": "Want a quick assessment to know your English level?", - "answer_quick_questions": "Answer a few quick questions to help us understand your English proficiency.", - "skip": "Skip", - "finish_level": "Finish Level", - "likely_speaker": "You’re likely speaker of", - "great_job": "Great Job! Here’s your next step to keep improving.", - "lets_start_practice": "Let's start your practice", - "welcome_abroad": "Welcome aboard", - "ready_to_explore": "You’re ready to explore your personalized lessons.", - "finish": "Finish", - "finish_all_practice_lesson": "Finish the previous lesson practice to take this practice", - "finish_all_practice_module": "Finish the lesson practices to take the Module Practice", - "finish_all_practice_course": "Finish the Module practices to take the Course practice", - "finish_all_practice_previouse_module": "Finish the previous Module practice to take this practice", - "finish_all_practice_previouse_course": "Finish the previous course practice to take this", - "track_journey": "Track your learning journey and see your growth over time.", - "learn_english": "Learn English", - "keep_momentum": "Great job! Keep the momentum.", - "completed_practices": "Completed Practices", - "total_practices": "Total Practices", - "progress_percentage": "Progress Percentage" -}; -static const Map> mapLocales = {"am": _am, "en": _en}; + static const Map _am = { + "loading": "በመጫን ላይ", + "welcome_back": "እንኳን በደህና ተመለሱ", + "checking_user_info": "የተጠቃሚ መረጃን በማረጋገጥ ላይ", + "dont_have_account": "መለያ የለዎትም?", + "email": "ኢሜይል", + "password": "የይለፍ ቃል", + "forgot_password": "የይለፍ ቃል ረሱ?", + "cont": "ቀጥል", + "register": "ይመዝገቡ", + "login_with_google": "በጉግል ይግቡ", + "or": "ወይም", + "login_with_phone": "በስልክ ቁጥር ይግቡ", + "create_account": "አዲስ መለያ ይፍጠሩ", + "already_have_account": "መለያ አለዎት?", + "login": " ይግቡ ", + "register_with_google": "በጉግል ይመዝገቡ", + "register_with_phone": "በስልክ ቁጥር ይመዝገቡ", + "enter_phone_number": "የስልክ ቁጥርዎን ያስገቡ። የማረጋገጫ ኮድ እንልክልዎታለን።", + "login_with_email": "በኢሜይል ይግቡ", + "create_password": "የይለፍ ቃል ይፍጠሩ", + "confirm_password": "የይለፍ ቃል ያረጋግጡ", + "eight_character_minimum": "ቢያንስ 8 ፊደላት", + "password_match": "የይለፍ ቃሉ ተመሳስሏል", + "sign_up_agreement": + "‘ይመዝገቡ’ የሚለውን ሲጫኑ በ‘አገልግሎት ውሎች’ እና ‘በግላዊነት ፖሊሲ’ ይስማማሉ።", + "terms_of_services": "የአገልግሎት ውሎች", + "and": "እና", + "privacy_policy": "የግላዊነት ፖሊሲ", + "register_with_email": "በኢሜል ይመዝገቡ", + "verification_code": "የማረጋገጫ ኮድ", + "resend_code": "ኮዱን እንደገና ላክ", + "code_sent_to_phone": "ኮዱ ወደ ስልክ ቁጥርዎ ተልኳል", + "code_sent_to_email": "ኮዱ ወደ ኢሜል ተልኳል", + "resend_code_in": "ኮዱን እንደገና ለመላክ የቀረው ጊዜ", + "reset_password": " የይለፍ ቃልን ይቀይሩ", + "enter_email_reset_code": "ኢሜይልዎን ያስገቡ። የይለፍ ቃል መለወጫ ኮድ እንልክልዎታለን።", + "please_wait": "እባክዎ ይጠብቁ", + "reset_code_sent": "የመቀየሪያ ኮድ በተሳካ ሁኔታ ተልኳል", + "reset_code": " የመቀየሪያ ኮድ ", + "new_password": "አዲስ የይለፍ ቃል", + "logged_in_successfully": "በተሳካ ሁኔታ ገብተዋል", + "view_course": " ኮርሱን ይመልከቱ", + "continue_learning": "መማርን ይቀጥሉ", + "start_learning": "ትምህርትን ይጀምሩ", + "completed": "ተጠናቋል", + "take_practice": "ልምምድ ያድርጉ", + "your_current_level": "የአሁኑ ደረጃዎ", + "overall_progress": "አጠቃላይ እድገት", + "great_work": "በርቱ! በጣም ጥሩ እየሰሩ ነው", + "view_module": "ሞጁሉን ይመልከቱ", + "progress": "እድገት", + "keep_going": "ይቀጥሉ - ከግማሽ በላይ ጨርሰዋል ", + "lessons_in_module": "በዚህ ሞጁል ውስጥ ያሉ ትምህርቶች ", + "practice": "ልምምድ", + "start": "ጀምር", + "in_progress": "በሂደት ላይ", + "hello": "ሰላም", + "ready_to_learn": " ዛሬ እንግሊዝኛ ለመማር ተዘጋጅተዋል? ", + "learn": "ይማሩ ", + "course": "ኮርስ", + "profile": " ፕሮፋይል ", + "speaking_partner": "የንግግር ጓደኛ", + "practice_what_you_learned": "አሁን የተማሩትን እንለማመድ", + "practice_questions": "ጥቂት ጥያቄዎችን እጠይቃለሁ እና መልስ መስጠት ይችላሉ", + "start_practice": "ልምምድ ጀምር", + "almost_there": "ሊጨርሱ ተቃርበዋል", + "finish_session": "እድገትዎን ለማየት ክፍለ ጊዜውን ያጠናቅቁ", + "continue_practice": "ልምምዱን ይቀጥሉ", + "end_session": "ክፍለ ጊዜውን ያብቁ ", + "tap_start_to_listen": "ለማዳመጥ የጀምር ቁልፉን ይጫኑ", + "practice_speaking": "ንግግርን ይለማመዱ", + "tap_microphone": "ለመናገር ማይክሮፎኑን ይጫኑ", + "reply": "እንደገና አዳምጥ", + "cancel": "ይቅር", + "you_are_speaking": "እየተናገሩ ነው", + "practice_completed": "ልምምዱ ተጠናቅቋል", + "great_improvement": "በዚህኛው በራስ መተማመንዎ ጨምሯል፤ ትልቅ መሻሻል ነው", + "practice_again": "እንደገና ይለማመዱ", + "conversation_review": "የንግግር ግምገማ", + "result": "ውጤት", + "quick_tip": "ጠቃሚ ምክር", + "retry": "እንደገና ይሞክሩ", + "completed_a1": "እንኳን ደስ አለዎት! A1 ደረጃን አጠናቅቀዋል", + "analyzing_speaking": "የንግግር ችሎታዎን እየገመገምን ነው", + "view_profile": "ፕሮፋይሎን ይመልከቱ ", + "hi": "ሰላም", + "edit_profile": "መገለጫ ያስተካክሉ", + "first_name": "የመጀመሪያ ስም", + "last_name": "የአባት ስም", + "gender": "ፆታ", + "male": "ወንድ", + "female": "ሴት", + "phone_number": "የስልክ ቁጥር", + "country": "ሀገር", + "region": "ክልል", + "select_region": "ክልል ይምረጡ", + "enter_your_city": "ከተማዎን ያስገቡ", + "occupation": "የስራ መስክ", + "select_occupation": "ሙያዎን ይምረጡ", + "save_changes": "ለውጦችን ያስቀምጡ", + "my_progress": "የእኔ እድገት", + "track_your_achievement": "ስኬቶችዎን እና ተከታታይ የትምህርት ጉዞዎን ይከታተሉ", + "account_and_privacy": "መለያ እና ግላዊነት", + "manage_settings": "ቅንብሮችን እና የመተግበሪያ ምርጫዎችን ያስተዳድሩ", + "support": "ድጋፍ", + "get_help": "በስልክ ወይም በቴሌግራም እገዛ ያግኙ", + "logout": "ውጣ", + "app_settings": "የመተግበሪያ ቅንብሮች", + "legal_and_information": "ሕጋዊ እና መረጃ", + "change_language": "ቋንቋ ቀይር", + "terms_and_conditions": "ውሎች እና ሁኔታዎች", + "delete_account": "መለያ ሰርዝ", + "language_preference": "የቋንቋ ምርጫ", + "choose_your_language": "ለውጦችን አስቀምጥ", + "switch_language_anytime": "ቋንቋዎችን በማንኛውም ጊዜ መቀየር ይችላሉ", + "need_help": "እገዛ ይፈልጋሉ?", + "call_support": "የስልክ ድጋፍ", + "talk_with_support": "በቀጥታ ከድጋፍ ቡድናችን ጋር ይነጋገሩ", + "telegram_support": "የቴሌግራም ድጋፍ", + "chat_via_telegram": "በቴሌግራም በፍጥነት ይወያዩ", + "call_our_support": "ከ3 ጠዋት እስከ 12 ማታ ድረስ የድጋፍ ቡድናችንን ይደውሉ", + "tap_to_call": "ለመደወል ይንኩ", + "join_telegram": "በቴሌግራም የይማሩ አካዳሚን ይቀላቀሉ", + "connect_with_support_team": + "ለፈጣን እርዳታ እና የማህበረሰብ ዝማኔዎች፣ በቴሌግራም ከድጋፍ ቡድናችን ጋር ወዲያውኑ ይገናኙ።", + "open_in_telegram": "በቴሌግራም ይክፈቱ", + "search_for": "ፈልጉት", + "current_level": "የአሁኑ ደረጃ", + "keep_up_the_great_work": "በጣም ጥሩ እየሰራህ ነው! ቀጥልበት፣ አስደናቂ ነህ።", + "no_practice_available": "ምንም ልምምድ አልተገኘም!", + "begin_module_practice": "የሞጁሉን ልምምድ ጀምር", + "lets_practice_lesson": "እንለማመድ", + "lets_quickly_review": "በዚህ ሞጁል ውስጥ የተማርከውን በፍጥነት እንከልስ!", + "lets_practice_module": "አሁን የተማርከውን እንለማመድ!", + "ask_you_few_actions": "ጥቂት ጥያቄዎችን እጠይቅሃለሁ፣ አንተም በተፈጥሮ መልስ ልትሰጥ ትችላለህ።", + "begin_level_practice": "የደረጃ ልምምድን ጀምር", + "lets_practice_course": "የኮርሱን ልምምድ እንለማመድ", + "lets_quick_review": "በዚህ ደረጃ የተማርከውን በፍጥነት እንከልስ!", + "speaking": "እየተናገረ ነው", + "you_have_finished_practice": "ልምምድህን አጠናቀቅህ", + "view_results": "ውጤቶቼን እይ", + "sample_answer": "ናሙና መልስ", + "your_answer": "መልስህ", + "sound_confident": "በዚህ ጊዜ የበለጠ እምነት ያለህ ይመስላል — በጣም ጥሩ መሻሻል ነው!", + "you_have_completed": "አያይ! አጠናቀቅህ", + "yes": "አዎ", + "no": "አይ", + "want_to_quit": "ለመውጣት እርግጠኛ ነህ?", + "required_field": "ይህ መስክ ያስፈልጋል", + "enter_full_name": "ሙሉ ስምህን አስገባ", + "invalid_email": "የማይሰራ የኢሜይል ቅርጸት", + "phone_must_start_with": "የስልክ ቁጥር በ251 መጀመር አለበት", + "phone_must_be": "የስልክ ቁጥር 12 አሃዞች መሆን አለበት", + "what_should_we_call_you": "ምን ብለን እንጠራህ?", + "name_for_personalization": "በመማር ጉዞህ ውስጥ ለግል ለማድረግ ስምህን እንጠቀማለን።", + "choose_your_gender": "ጾታህን ምረጥ", + "gender_for_personalization": "በጾታህ መሰረት የመማር ተሞክሮህን እናበጅለታለን።", + "age_range": "በየትኛው የእድሜ ክልል ውስጥ ነህ?", + "age_for_personalization": "በእድሜህ መሰረት የመማር ተሞክሮህን እናበጅለታለን።", + "educational_background": "አሁን ያለህ የትምህርት ደረጃ ምንድን ነው?", + "education_for_personalization": "ይህ ትምህርቶችን ከልምድህ ጋር እንዲስማሙ ለማድረግ ይረዳናል።", + "your_occupation": "ስራህ ምንድን ነው?", + "occupation_for_personalization": "በስራህ መሰረት የመማር ተሞክሮህን እናበጅለታለን።", + "location": "ከየት ነህ?", + "select_country_region": "አገርህን እና ክልልህን ከተቆልቋይ ዝርዝሩ ምረጥ", + "select_country": "አገር ምረጥ", + "learning_goal": "የመማር ዓላማህን ምረጥ", + "language_goal": "እንግሊዝኛህን ለማሻሻል ዋና ዓላማህ ምንድን ነው?", + "your_goal": "ዓላማህ የመማር ጉዞህን እንዲስማማ ለማድረግ ይረዳናል።", + "write_your_goal": "ዓላማህን ጻፍ…", + "challenge_you_face": "What challenge do you face most with English?", + "evey_one_has_strugle": "ሁሉም ሰው ችግሮች አሉት፣ የአንተን እንጀምር እንፍታ", + "write_your_challenge": "ችግርህን ጻፍ…", + "topic_interest": "በጣም የሚስቡህ ርዕሶች የትኞቹ ናቸው?", + "favourite_topic": + "የምትወዳቸው ርዕሶች አስደሳች እና ከሕይወትህ ጋር የተዛመዱ ትምህርቶችን ለመፍጠር ይረዱናል።", + "your_interest": "ፍላጎትህን ጻፍ…", + "want_quick_assessment": "የእንግሊዝኛ ደረጃህን ለማወቅ ፈጣን ግምገማ ትፈልጋለህ?", + "answer_quick_questions": "የእንግሊዝኛ ችሎታህን ለመረዳት ጥቂት ፈጣን ጥያቄዎችን መልስ።", + "skip": "ዝለል", + "finish_level": "ደረጃውን አጠናቅቅ", + "likely_speaker": "አንተ ምናልባት ተናጋሪ ነህ", + "great_job": "በጣም ጥሩ ስራ! ለመሻሻል ቀጣዩ ደረጃህ ይኸው ነው።", + "lets_start_practice": "ልምምድህን እንጀምር", + "welcome_abroad": "እንኳን ደህና መጣህ", + "ready_to_explore": "የግል ትምህርቶችህን ለማሰስ ዝግጁ ነህ።", + "finish": "አጠናቅቅ", + "finish_all_practice_lesson": "ይህን ልምምድ ለመውሰድ የቀድሞውን የትምህርት ልምምድ ያጠናቅቁ", + "finish_all_practice_module": "የሞጁሉን ልምምድ ለመውሰድ የትምህርት ልምምዶችን ያጠናቅቁ", + "finish_all_practice_course": "የኮርሱን ልምምድ ለመውሰድ የሞጁል ልምምዶችን ያጠናቅቁ", + "finish_all_practice_previouse_module": + "ይህን ልምምድ ለመውሰድ የቀድሞውን የሞጁል ልምምድ ያጠናቅቁ", + "finish_all_practice_previouse_course": "ይህን ለመውሰድ የቀድሞውን የኮርስ ልምምድ ያጠናቅቁ", + "track_journey": "የትምህርት ጉዞዎን ይከታተሉ እና በጊዜ ሂደት ያሳዩትን እድገት ይመልከቱ።", + "learn_english": "እንግሊዝኛ ይማሩ", + "keep_momentum": "በጣም ጥሩ ስራ! በዚሁ ብርታት ይቀጥሉ።", + "completed_practices": "የተጠናቀቁ ልምምዶች", + "total_practices": "ጠቅላላ ልምምዶች", + "progress_percentage": "የእድገት መቶኛ" + }; + static const Map _en = { + "loading": "Loading", + "welcome_back": "Welcome back", + "checking_user_info": "Checking user info", + "dont_have_account": "Don't have an account?", + "email": "Email", + "password": "Password", + "forgot_password": "Forgot password?", + "cont": "Continue", + "register": "Register", + "login_with_google": "Login with Google", + "or": "Or", + "login_with_phone": "Login with phone number", + "create_account": "Create an account", + "already_have_account": "Already have an account?", + "login": "Login", + "register_with_google": "Register with Google", + "register_with_phone": "Register with phone number", + "enter_phone_number": + "Enter your phone number. We will send you a confirmation code there.", + "login_with_email": "Login with email", + "create_password": "Create password", + "confirm_password": "Confirm password", + "eight_character_minimum": "8 characters minimum", + "password_match": "password match", + "sign_up_agreement": + "By clicking ‘Sign Up’, you agree to our ‘Terms of Service’ and ‘Privacy Policy’", + "terms_of_services": "Terms of Service", + "and": "and", + "privacy_policy": "Privacy Policy", + "register_with_email": "Register with email", + "verification_code": "Verification Code", + "resend_code": "Resend Code", + "code_sent_to_phone": "Code sent to your number", + "code_sent_to_email": "Code sent to your email", + "resend_code_in": "Resend code in", + "reset_password": "Reset Password", + "enter_email_reset_code": + "Enter your email. We will send you a reset code.", + "please_wait": "Please wait", + "reset_code_sent": "Reset code sent successfully", + "reset_code": "Reset code", + "new_password": "New password", + "logged_in_successfully": "Logged in successfully", + "continue_learning": "Continue Learning", + "start_learning": "Start Learning", + "completed": "Completed", + "view_course": "View course", + "take_practice": "Take practice", + "your_current_level": "Your current level", + "overall_progress": "Overall progress", + "great_work": "Keep up the great work! You're doing amazing", + "view_module": "View module", + "progress": "Progress", + "keep_going": "Let's keep going - you're more than half there", + "lessons_in_module": "Lessons in this module", + "practice": "Practice", + "start": "Start", + "in_progress": "In Progress", + "hello": "Hello", + "ready_to_learn": "Ready to keep learning English today", + "learn": "Learn", + "course": "Course", + "profile": "Profile", + "speaking_partner": "Speaking partner", + "practice_what_you_learned": "Let's practice what you just learnt", + "practice_questions": "I will ask you a few questions and you can respond", + "start_practice": "Start practice", + "almost_there": "You're almost there", + "finish_session": "Finish the session to see your progress", + "continue_practice": "Continue practice", + "end_session": "End session", + "tap_start_to_listen": "Tap the start button to listen", + "practice_speaking": "Practice speaking", + "tap_microphone": "Tap the microphone to speak", + "reply": "Reply", + "cancel": "Cancel", + "you_are_speaking": "You're speaking", + "practice_completed": "Practice completed!", + "great_improvement": + "You sound more confident this time, great improvement", + "practice_again": "Practice again", + "conversation_review": "Conversation review", + "result": "Result", + "quick_tip": "Quick tip", + "retry": "Retry", + "completed_a1": "Yay, you've completed A1", + "analyzing_speaking": "We're now analyzing your speaking skill", + "view_profile": "View profile", + "hi": "Hi", + "edit_profile": "Edit profile", + "first_name": "First name", + "last_name": "Last name", + "gender": "Gender", + "male": "Male", + "female": "Female", + "phone_number": "Phone number", + "country": "Country", + "region": "Region", + "select_region": "Select region", + "enter_your_city": "Enter your city", + "occupation": "Occupation", + "select_occupation": "Select occupation", + "save_changes": "Save changes", + "my_progress": "My progress", + "track_your_achievement": "Track your achievements and learning streak", + "account_and_privacy": "Account & Privacy", + "manage_settings": "Manage settings and app preference", + "support": "Support", + "get_help": "Get help through phone or Telegram", + "logout": "Logout", + "app_settings": "App settings", + "legal_and_information": "Legal & Information", + "change_language": "Change language", + "terms_and_conditions": "Terms & Conditions", + "delete_account": "Delete account", + "language_preference": "Language preference", + "choose_your_language": "Choose your language", + "switch_language_anytime": "You can switch languages anytime", + "need_help": "Need help?", + "call_support": "Call support", + "talk_with_support": "Talk with our support team directly", + "telegram_support": "Telegram support", + "chat_via_telegram": "Chat instantly via Telegram", + "call_our_support": "Call our support team between 9 AM - 6 PM", + "tap_to_call": "Tap to call", + "join_telegram": "Join Yimaru Academy on Telegram", + "connect_with_support_team": + "Connect with our support team instantly on Telegram for quick assistance and community updates", + "open_in_telegram": "Open in Telegram", + "search_for": "Search for", + "current_level": "Current Level", + "keep_up_the_great_work": "Keep up the great work! You're doing amazing.", + "no_practice_available": "No practice available!", + "begin_module_practice": "Begin Module Practice", + "lets_practice_lesson": "Let’s Practice", + "lets_quickly_review": + "Let’s quickly review what you’ve learned in this module!", + "lets_practice_module": "Let's practice what you just learnt!", + "ask_you_few_actions": + "I’ll ask you a few questions, and you can respond naturally.", + "begin_level_practice": "Begin Level Practice", + "lets_practice_course": "Let’s Practice Course", + "lets_quick_review": + "Let’s quickly review what you’ve learned in this level!", + "speaking": "is speaking...", + "you_have_finished_practice": "You have finished your practice", + "view_results": "View My Results", + "sample_answer": "Sample Answer", + "your_answer": "Your Answer", + "sound_confident": + "You sound more confident this time - great improvement!", + "you_have_completed": "Yay, you’ve completed", + "yes": "Yes", + "no": "No", + "want_to_quit": "Are you sure you want to quit?", + "required_field": "The field is required", + "enter_full_name": "Enter your full name", + "invalid_email": "Invalid email format", + "phone_must_start_with": "Phone number must start with 251", + "phone_must_be": "Phone number must be 12 digits", + "what_should_we_call_you": "What should we call you?", + "name_for_personalization": + "We’ll use your name to personalize your learning journey.", + "choose_your_gender": "Choose your gender?", + "gender_for_personalization": + "We’ll personalize your learning experience based on your gender.", + "age_range": "Which age range are you in?", + "age_for_personalization": + "We’ll personalize your learning experience based on your age.", + "educational_background": "What’s your current educational level?", + "education_for_personalization": + "This helps us tailor your lessons to your experience.", + "your_occupation": "What’s your occupation?", + "occupation_for_personalization": + "We’ll personalize your learning experience based on your occupation.", + "location": "Where are you from?", + "select_country_region": "Select your country and region from the dropdown", + "select_country": "Select country", + "learning_goal": "Choose your learning goal.", + "language_goal": "What’s your main goal for improving your English?", + "your_goal": "Your goal helps us tailor your learning journey.", + "write_your_goal": "Write your goal…", + "challenge_you_face": "What challenge do you face most with English?", + "evey_one_has_strugle": "Everyone has struggles, let’s start fixing yours", + "write_your_challenge": "Write your challenge…", + "topic_interest": "Which topics interest you most?", + "favourite_topic": + "Your favorite topics help us create fun, relatable lessons.", + "your_interest": "Write your interest…", + "want_quick_assessment": + "Want a quick assessment to know your English level?", + "answer_quick_questions": + "Answer a few quick questions to help us understand your English proficiency.", + "skip": "Skip", + "finish_level": "Finish Level", + "likely_speaker": "You’re likely speaker of", + "great_job": "Great Job! Here’s your next step to keep improving.", + "lets_start_practice": "Let's start your practice", + "welcome_abroad": "Welcome aboard", + "ready_to_explore": "You’re ready to explore your personalized lessons.", + "finish": "Finish", + "finish_all_practice_lesson": + "Finish the previous lesson practice to take this practice", + "finish_all_practice_module": + "Finish the lesson practices to take the Module Practice", + "finish_all_practice_course": + "Finish the Module practices to take the Course practice", + "finish_all_practice_previouse_module": + "Finish the previous Module practice to take this practice", + "finish_all_practice_previouse_course": + "Finish the previous course practice to take this", + "track_journey": + "Track your learning journey and see your growth over time.", + "learn_english": "Learn English", + "keep_momentum": "Great job! Keep the momentum.", + "completed_practices": "Completed Practices", + "total_practices": "Total Practices", + "progress_percentage": "Progress Percentage" + }; + static const Map> mapLocales = { + "am": _am, + "en": _en + }; } diff --git a/lib/ui/common/translations/locale_keys.g.dart b/lib/ui/common/translations/locale_keys.g.dart index c6d4cbc..e3cee97 100644 --- a/lib/ui/common/translations/locale_keys.g.dart +++ b/lib/ui/common/translations/locale_keys.g.dart @@ -2,7 +2,7 @@ // ignore_for_file: constant_identifier_names -abstract class LocaleKeys { +abstract class LocaleKeys { static const loading = 'loading'; static const welcome_back = 'welcome_back'; static const checking_user_info = 'checking_user_info'; @@ -161,7 +161,8 @@ abstract class LocaleKeys { static const educational_background = 'educational_background'; static const education_for_personalization = 'education_for_personalization'; static const your_occupation = 'your_occupation'; - static const occupation_for_personalization = 'occupation_for_personalization'; + static const occupation_for_personalization = + 'occupation_for_personalization'; static const location = 'location'; static const select_country_region = 'select_country_region'; static const select_country = 'select_country'; @@ -188,13 +189,14 @@ abstract class LocaleKeys { static const finish_all_practice_lesson = 'finish_all_practice_lesson'; static const finish_all_practice_module = 'finish_all_practice_module'; static const finish_all_practice_course = 'finish_all_practice_course'; - static const finish_all_practice_previouse_module = 'finish_all_practice_previouse_module'; - static const finish_all_practice_previouse_course = 'finish_all_practice_previouse_course'; + static const finish_all_practice_previouse_module = + 'finish_all_practice_previouse_module'; + static const finish_all_practice_previouse_course = + 'finish_all_practice_previouse_course'; static const track_journey = 'track_journey'; static const learn_english = 'learn_english'; static const keep_momentum = 'keep_momentum'; static const completed_practices = 'completed_practices'; static const total_practices = 'total_practices'; static const progress_percentage = 'progress_percentage'; - } diff --git a/lib/ui/views/home/home_viewmodel.dart b/lib/ui/views/home/home_viewmodel.dart index 597746e..4514e77 100644 --- a/lib/ui/views/home/home_viewmodel.dart +++ b/lib/ui/views/home/home_viewmodel.dart @@ -55,8 +55,6 @@ class HomeViewModel extends ReactiveViewModel { rebuildUi(); } - - // Remote api calls // In-app update diff --git a/lib/ui/views/language/language_viewmodel.dart b/lib/ui/views/language/language_viewmodel.dart index 21d6613..87a5857 100644 --- a/lib/ui/views/language/language_viewmodel.dart +++ b/lib/ui/views/language/language_viewmodel.dart @@ -28,14 +28,13 @@ class LanguageViewModel extends ReactiveViewModel { _localizationService.isSelectedLanguage(title); Future setSelectedLanguage( - {required BuildContext context, - required Map title}) async { + {required BuildContext context, + required Map title}) async { await _localizationService.setSelectedLanguage( context: context, title: title); rebuildUi(); } - // Navigation void pop() => _navigationService.back(); } diff --git a/lib/ui/views/learn_course/learn_course_view.dart b/lib/ui/views/learn_course/learn_course_view.dart index 076dc27..2f0ab8d 100644 --- a/lib/ui/views/learn_course/learn_course_view.dart +++ b/lib/ui/views/learn_course/learn_course_view.dart @@ -13,8 +13,10 @@ import 'learn_course_viewmodel.dart'; class LearnCourseView extends StackedView { final int id; + final bool first; - const LearnCourseView({Key? key, required this.id}) : super(key: key); + const LearnCourseView({Key? key, required this.id, required this.first}) + : super(key: key); Future _onPractice( {required BuildContext context, @@ -151,7 +153,9 @@ class LearnCourseView extends StackedView { viewModel: viewModel, course: viewModel.courses[index]), onViewTap: () async => - await viewModel.navigateToLearnModule(viewModel.courses[index]), + await viewModel.navigateToLearnModule( + first: first && index ==0, + course: viewModel.courses[index]), ), separatorBuilder: (context, index) => verticalSpaceSmall, ); diff --git a/lib/ui/views/learn_course/learn_course_viewmodel.dart b/lib/ui/views/learn_course/learn_course_viewmodel.dart index 6b3caac..2110943 100644 --- a/lib/ui/views/learn_course/learn_course_viewmodel.dart +++ b/lib/ui/views/learn_course/learn_course_viewmodel.dart @@ -32,8 +32,8 @@ class LearnCourseViewModel extends ReactiveViewModel { Future navigateToLearnSubscription() async => await _navigationService.navigateToLearnSubscriptionView(); - Future navigateToLearnModule(LearnCourse course) async => - _navigationService.navigateToLearnModuleView(course: course); + Future navigateToLearnModule({required bool first,required LearnCourse course}) async => + _navigationService.navigateToLearnModuleView(first: first,course: course); Future navigateToLearnPractice( {required int id, required String level}) async => diff --git a/lib/ui/views/learn_lesson/learn_lesson_view.dart b/lib/ui/views/learn_lesson/learn_lesson_view.dart index 8062007..51604f1 100644 --- a/lib/ui/views/learn_lesson/learn_lesson_view.dart +++ b/lib/ui/views/learn_lesson/learn_lesson_view.dart @@ -17,32 +17,25 @@ import '../../widgets/small_app_bar.dart'; import 'learn_lesson_viewmodel.dart'; class LearnLessonView extends StackedView { + final bool first; final LearnModule module; - const LearnLessonView({Key? key, required this.module}) : super(key: key); + const LearnLessonView({Key? key, required this.first, required this.module}) + : super(key: key); Future _onPractice( {required int index, required LearnLesson lesson, required BuildContext context, required LearnLessonViewModel viewModel}) async { -/* if (lesson.access?.isAccessible ?? false) { - await viewModel.navigateToLearnPractice(lesson.id ?? 0); - } else { - await _showSheet(context: context, viewModel: viewModel); - }*/ - if (index > 1) { - if (viewModel.user?.subscriptionStatus?.toLowerCase() == 'active') { - if (lesson.access?.isAccessible ?? false) { - await viewModel.navigateToLearnPractice(lesson.id ?? 0); - } else { - await _showSheet(context: context, viewModel: viewModel); - } + if (viewModel.user?.subscriptionStatus?.toLowerCase() == 'active') { + if (lesson.access?.isAccessible ?? false) { + await viewModel.navigateToLearnPractice(lesson.id ?? 0); } else { - await viewModel.navigateToLearnSubscription(); + await _showSheet(context: context, viewModel: viewModel); } } else { - if (lesson.access?.isAccessible ?? false) { + if (first && index < 3) { await viewModel.navigateToLearnPractice(lesson.id ?? 0); } else { await _showSheet(context: context, viewModel: viewModel); @@ -224,6 +217,7 @@ class LearnLessonView extends StackedView { physics: const NeverScrollableScrollPhysics(), itemBuilder: (context, index) => _buildTile( index: index, + first: first && index < 3, lesson: viewModel.lessons[index], last: index == viewModel.lessons.length - 1, onPracticeTap: () async => await _onPractice( @@ -244,12 +238,14 @@ class LearnLessonView extends StackedView { Widget _buildTile({ required bool last, required int index, + required bool first, required LearnLesson lesson, required GestureTapCallback? onLessonTap, required GestureTapCallback? onPracticeTap, }) => LearnLessonTile( last: last, + first: first, index: index, lesson: lesson, onLessonTap: onLessonTap, diff --git a/lib/ui/views/learn_lesson_detail/learn_lesson_detail_view.dart b/lib/ui/views/learn_lesson_detail/learn_lesson_detail_view.dart index a272c03..0537477 100644 --- a/lib/ui/views/learn_lesson_detail/learn_lesson_detail_view.dart +++ b/lib/ui/views/learn_lesson_detail/learn_lesson_detail_view.dart @@ -31,21 +31,9 @@ class LearnLessonDetailView extends StackedView { Future _onPractice( {required LearnLesson lesson, required LearnLessonDetailViewModel viewModel}) async { - /* await viewModel.pause(); + await viewModel.pause(); await viewModel.navigateToLearnPractice(lesson.id ?? 0); -*/ - if (index > 1) { - if (viewModel.user?.subscriptionStatus?.toLowerCase() == 'active') { - await viewModel.pause(); - await viewModel.navigateToLearnPractice(lesson.id ?? 0); - } else { - await viewModel.pause(); - await viewModel.navigateToLearnSubscription(); - } - } else { - await viewModel.pause(); - await viewModel.navigateToLearnPractice(lesson.id ?? 0); - } + } @override diff --git a/lib/ui/views/learn_module/learn_module_view.dart b/lib/ui/views/learn_module/learn_module_view.dart index 3a5d599..f3bcd0d 100644 --- a/lib/ui/views/learn_module/learn_module_view.dart +++ b/lib/ui/views/learn_module/learn_module_view.dart @@ -16,9 +16,11 @@ import '../../widgets/small_app_bar.dart'; import 'learn_module_viewmodel.dart'; class LearnModuleView extends StackedView { + final bool first; final LearnCourse course; - const LearnModuleView({Key? key, required this.course}) : super(key: key); + const LearnModuleView({Key? key, required this.first, required this.course}) + : super(key: key); Future _onPractice( {required BuildContext context, @@ -202,7 +204,9 @@ class LearnModuleView extends StackedView { module: viewModel.modules[index], ), onModuleTap: () async => - await viewModel.navigateToLearnLesson(viewModel.modules[index]), + await viewModel.navigateToLearnLesson( + first: first && index == 0, + module: viewModel.modules[index]), ), ); diff --git a/lib/ui/views/learn_module/learn_module_viewmodel.dart b/lib/ui/views/learn_module/learn_module_viewmodel.dart index 955cd38..c43f4b7 100644 --- a/lib/ui/views/learn_module/learn_module_viewmodel.dart +++ b/lib/ui/views/learn_module/learn_module_viewmodel.dart @@ -35,8 +35,8 @@ class LearnModuleViewModel extends ReactiveViewModel { // Navigation void pop() => _navigationService.back(); - Future navigateToLearnLesson(LearnModule module) async => - await _navigationService.navigateToLearnLessonView(module: module); + Future navigateToLearnLesson({required bool first, required LearnModule module}) async => + await _navigationService.navigateToLearnLessonView(first:first,module: module); Future navigateToLearnPractice( {required int id, required String module}) async => diff --git a/lib/ui/views/learn_practice/learn_practice_viewmodel.dart b/lib/ui/views/learn_practice/learn_practice_viewmodel.dart index 6ca8a5a..729f911 100644 --- a/lib/ui/views/learn_practice/learn_practice_viewmodel.dart +++ b/lib/ui/views/learn_practice/learn_practice_viewmodel.dart @@ -10,6 +10,7 @@ import 'package:yimaru_app/services/voice_recorder_service.dart'; import 'package:yimaru_app/ui/common/enmus.dart'; import '../../../app/app.locator.dart'; +import '../../../app/app.router.dart'; import '../../../models/learn_question.dart'; import '../../../services/api_service.dart'; import '../../../services/audio_player_service.dart'; @@ -264,6 +265,9 @@ class LearnPracticeViewModel extends ReactiveViewModel { // Navigation void pop() => _navigationService.back(); + Future navigateToLearnSubscription() async => + await _navigationService.navigateToLearnSubscriptionView(); + // Remote api call // Refresh url diff --git a/lib/ui/views/learn_practice/screens/learn_practice_intro_screen.dart b/lib/ui/views/learn_practice/screens/learn_practice_intro_screen.dart index 0555037..427679d 100644 --- a/lib/ui/views/learn_practice/screens/learn_practice_intro_screen.dart +++ b/lib/ui/views/learn_practice/screens/learn_practice_intro_screen.dart @@ -27,6 +27,14 @@ class LearnPracticeIntroScreen extends ViewModelWidget { required this.subtitle, required this.practice}); + Future _practice(LearnPracticeViewModel viewModel) async { + if (viewModel.user?.subscriptionStatus?.toLowerCase() == 'active') { + viewModel.goTo(1); + } else { + await viewModel.navigateToLearnSubscription(); + } + } + Future _cancel(LearnPracticeViewModel viewModel) async { await viewModel.stopRecording(); viewModel.pop(); @@ -207,7 +215,7 @@ class LearnPracticeIntroScreen extends ViewModelWidget { text: label, borderRadius: 12, foregroundColor: kcWhite, - onTap: () => viewModel.goTo(1), backgroundColor: kcPrimaryColor, + onTap: () async => await _practice(viewModel), ); } diff --git a/lib/ui/views/learn_program/learn_program_view.dart b/lib/ui/views/learn_program/learn_program_view.dart index 38f985f..4d661b7 100644 --- a/lib/ui/views/learn_program/learn_program_view.dart +++ b/lib/ui/views/learn_program/learn_program_view.dart @@ -87,8 +87,8 @@ class LearnProgramView extends StackedView { separatorBuilder: (context, index) => verticalSpaceSmall, itemBuilder: (context, index) => _buildTile( program: viewModel.learnPrograms[index], - onTap: () async => await viewModel - .navigateToLearnCourse(viewModel.learnPrograms[index].id ?? 0), + onTap: () async => await viewModel.navigateToLearnCourse( + first: index == 0, id: viewModel.learnPrograms[index].id ?? 0), ), ); diff --git a/lib/ui/views/learn_program/learn_program_viewmodel.dart b/lib/ui/views/learn_program/learn_program_viewmodel.dart index 0c63a3a..738c359 100644 --- a/lib/ui/views/learn_program/learn_program_viewmodel.dart +++ b/lib/ui/views/learn_program/learn_program_viewmodel.dart @@ -36,8 +36,8 @@ class LearnProgramViewModel extends ReactiveViewModel { List get learnPrograms => _learnPrograms; // Navigation - Future navigateToLearnCourse(int id) async => - _navigationService.navigateToLearnCourseView(id: id); + Future navigateToLearnCourse({required int id,required bool first}) async => + _navigationService.navigateToLearnCourseView(id: id,first: first); // Remote api call diff --git a/lib/ui/views/onboarding/onboarding_viewmodel.dart b/lib/ui/views/onboarding/onboarding_viewmodel.dart index 8844c75..dab3c7c 100644 --- a/lib/ui/views/onboarding/onboarding_viewmodel.dart +++ b/lib/ui/views/onboarding/onboarding_viewmodel.dart @@ -205,8 +205,8 @@ class OnboardingViewModel extends ReactiveViewModel _selectedCountry = value; if (value?.code?.toLowerCase().trim() == 'et') { _dropdownRegion = true; - _selectedRegion = _regions - .firstWhere((e) => e.code?.toLowerCase().trim().contains('addis_ababa') ?? false); + _selectedRegion = _regions.firstWhere( + (e) => e.code?.toLowerCase().trim().contains('addis_ababa') ?? false); } else { _dropdownRegion = false; } diff --git a/lib/ui/views/payment/payment_view.dart b/lib/ui/views/payment/payment_view.dart index f6754c9..6d27997 100644 --- a/lib/ui/views/payment/payment_view.dart +++ b/lib/ui/views/payment/payment_view.dart @@ -26,7 +26,8 @@ class PaymentView extends StackedView { @override void onViewModelReady(PaymentViewModel viewModel) async { - await viewModel.createLearnSubscriptionRequest(phone: phone,subscription: subscription); + await viewModel.createLearnSubscriptionRequest( + phone: phone, subscription: subscription); super.onViewModelReady(viewModel); } diff --git a/lib/ui/views/payment/payment_viewmodel.dart b/lib/ui/views/payment/payment_viewmodel.dart index 71896ed..f977fb9 100644 --- a/lib/ui/views/payment/payment_viewmodel.dart +++ b/lib/ui/views/payment/payment_viewmodel.dart @@ -45,18 +45,22 @@ class PaymentViewModel extends ReactiveViewModel { // Remote api call // Learn subscription - Future createLearnSubscriptionRequest({required String phone,required LearnSubscription subscription}) async => - await runBusyFuture(_createLearnSubscriptionRequest(phone: phone,subscription: subscription), + Future createLearnSubscriptionRequest( + {required String phone, + required LearnSubscription subscription}) async => + await runBusyFuture( + _createLearnSubscriptionRequest( + phone: phone, subscription: subscription), busyObject: StateObjects.learnSubscription); - Future _createLearnSubscriptionRequest({required String phone,required LearnSubscription subscription}) async { + Future _createLearnSubscriptionRequest( + {required String phone, required LearnSubscription subscription}) async { if (await _statusChecker.checkConnection()) { Map data = { 'provider': 'CHAPA', 'phone': '251$phone', 'email': 'test@gmail.com', 'plan_id': subscription.id, - }; Map response = diff --git a/lib/ui/views/profile/profile_view.dart b/lib/ui/views/profile/profile_view.dart index a1a236e..0fd9d51 100644 --- a/lib/ui/views/profile/profile_view.dart +++ b/lib/ui/views/profile/profile_view.dart @@ -166,7 +166,7 @@ class ProfileView extends StackedView { List _buildSettingsChildren(ProfileViewModel viewModel) => [ // _buildDownloadsCard(viewModel), - _buildProgressCard(viewModel), + _buildProgressCard(viewModel), _buildAccountCard(viewModel), _buildSupportCard(viewModel) ]; diff --git a/lib/ui/views/profile_detail/profile_detail_view.dart b/lib/ui/views/profile_detail/profile_detail_view.dart index daf4d4e..586863b 100644 --- a/lib/ui/views/profile_detail/profile_detail_view.dart +++ b/lib/ui/views/profile_detail/profile_detail_view.dart @@ -104,7 +104,7 @@ class ProfileDetailView extends StackedView viewModel.setSelectedOccupation(viewModel.occupations .where((e) => (e.code ?? '') == viewModel.user?.occupation) .first); - viewModel.setSelectedCountry(viewModel.countries + viewModel.setSelectedCountry(viewModel.countries .where((e) => (e.code ?? '') == viewModel.user?.country) .first); if (viewModel.user?.country?.toLowerCase() == 'et') { diff --git a/lib/ui/views/profile_detail/profile_detail_viewmodel.dart b/lib/ui/views/profile_detail/profile_detail_viewmodel.dart index d27b85c..0eff3d0 100644 --- a/lib/ui/views/profile_detail/profile_detail_viewmodel.dart +++ b/lib/ui/views/profile_detail/profile_detail_viewmodel.dart @@ -136,8 +136,8 @@ class ProfileDetailViewModel extends ReactiveViewModel void setEthiopianRegion(String region) { _dropdownRegion = true; - _selectedRegion = - _regions.firstWhere((r) => r.code?.toLowerCase() == region.toLowerCase()); + _selectedRegion = _regions + .firstWhere((r) => r.code?.toLowerCase() == region.toLowerCase()); rebuildUi(); } diff --git a/lib/ui/views/progress/progress_viewmodel.dart b/lib/ui/views/progress/progress_viewmodel.dart index f7c07cd..5f875e9 100644 --- a/lib/ui/views/progress/progress_viewmodel.dart +++ b/lib/ui/views/progress/progress_viewmodel.dart @@ -17,7 +17,6 @@ class ProgressViewModel extends ReactiveViewModel { @override List get listenableServices => [_learnService]; - // Total practice count int get _totalCount => _learnService.totalCount; @@ -33,7 +32,6 @@ class ProgressViewModel extends ReactiveViewModel { int get totalProgress => _totalProgress; - // Courses final List> _courses = [ { @@ -53,8 +51,9 @@ class ProgressViewModel extends ReactiveViewModel { // Learning progress - Future getProgressSummary() async => runBusyFuture(_getProgressSummary(), - busyObject: StateObjects.progressSummary); + Future getProgressSummary() async => + runBusyFuture(_getProgressSummary(), + busyObject: StateObjects.progressSummary); Future _getProgressSummary() async { if (await _statusCheckerService.checkConnection()) { diff --git a/lib/ui/widgets/learn_lesson_tile.dart b/lib/ui/widgets/learn_lesson_tile.dart index 891c420..7bfc4f9 100644 --- a/lib/ui/widgets/learn_lesson_tile.dart +++ b/lib/ui/widgets/learn_lesson_tile.dart @@ -17,6 +17,7 @@ import 'custom_linear_progress_indicator.dart'; class LearnLessonTile extends ViewModelWidget { final int index; final bool last; + final bool first; final LearnLesson lesson; final GestureTapCallback? onLessonTap; final GestureTapCallback? onPracticeTap; @@ -26,6 +27,7 @@ class LearnLessonTile extends ViewModelWidget { this.onLessonTap, this.onPracticeTap, required this.last, + required this.first, required this.index, required this.lesson}); @@ -35,7 +37,9 @@ class LearnLessonTile extends ViewModelWidget { Widget _buildContainerWrapper(LearnLessonViewModel viewModel) => GestureDetector( - onTap: !(lesson.access?.isAccessible ?? false) ? onPracticeTap : null, + onTap: viewModel.user?.subscriptionStatus?.toLowerCase() == 'active' ? !(lesson.access?.isAccessible ?? false) + ? onPracticeTap + : null: !first ? onPracticeTap:null, child: _buildContainer(viewModel), ); @@ -56,7 +60,7 @@ class LearnLessonTile extends ViewModelWidget { Widget _buildTileStack(LearnLessonViewModel viewModel) => Stack( children: [ _buildExpansionTile(viewModel), - _buildContainerShaderState() + _buildContainerShaderState(viewModel) ], ); @@ -70,7 +74,6 @@ class LearnLessonTile extends ViewModelWidget { shape: Border.all(color: kcTransparent), expandedAlignment: Alignment.centerLeft, leading: _buildLeadingWrapper(viewModel), - enabled: (lesson.access?.isAccessible ?? false), controlAffinity: ListTileControlAffinity.trailing, expandedCrossAxisAlignment: CrossAxisAlignment.start, tilePadding: const EdgeInsets.fromLTRB(15, 15, 15, 15), @@ -85,6 +88,7 @@ class LearnLessonTile extends ViewModelWidget { collapsedBackgroundColor: (lesson.access?.isCompleted ?? false) ? kcGreen.withOpacity(0.1) : kcPrimaryColor.withOpacity(0.1), + enabled: first ? true : (lesson.access?.isAccessible ?? false), children: _buildExpansionTileChildren(viewModel), ); @@ -203,9 +207,14 @@ class LearnLessonTile extends ViewModelWidget { backgroundColor: kcPrimaryColor, ); - Widget _buildContainerShaderState() => !(lesson.access?.isAccessible ?? false) - ? _buildContainerShader() - : Container(); + Widget _buildContainerShaderState(LearnLessonViewModel viewModel) => + viewModel.user?.subscriptionStatus?.toLowerCase() == 'active' + ? !(lesson.access?.isAccessible ?? false) + ? _buildContainerShader() + : Container() + : !first + ? _buildContainerShader() + : Container(); Widget _buildContainerShader() => const CustomContainerShader(); } diff --git a/pubspec.yaml b/pubspec.yaml index 4e4e977..5d93f30 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,6 +1,6 @@ name: yimaru_app publish_to: 'none' -version: 0.1.33+35 +version: 0.1.34+36 description: A new Flutter project. environment: