Merge branch 'release/0.1.19'
-fix: Applying learn UAT comments
This commit is contained in:
commit
03c9a52e05
|
|
@ -119,7 +119,53 @@
|
||||||
"telegram_support": "የቴሌግራም ድጋፍ",
|
"telegram_support": "የቴሌግራም ድጋፍ",
|
||||||
"chat_via_telegram": "በቴሌግራም በፍጥነት ይወያዩ",
|
"chat_via_telegram": "በቴሌግራም በፍጥነት ይወያዩ",
|
||||||
"call_our_support": "ከ3 ጠዋት እስከ 12 ማታ ድረስ የድጋፍ ቡድናችንን ይደውሉ",
|
"call_our_support": "ከ3 ጠዋት እስከ 12 ማታ ድረስ የድጋፍ ቡድናችንን ይደውሉ",
|
||||||
"tap_to_call": "ለመደወል ይንኩ"
|
"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_practice": "በዚህ ደረጃ የተማርከውን በፍጥነት እንከልስ!",
|
||||||
|
"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": "ምን ብለን እንጠራህ?",
|
||||||
|
"use_for_personalization": "በመማር ጉዞህ ውስጥ ለግል ለማድረግ ስምህን እንጠቀማለን።"
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -73,7 +73,7 @@
|
||||||
"reply": "Reply",
|
"reply": "Reply",
|
||||||
"cancel": "Cancel",
|
"cancel": "Cancel",
|
||||||
"you_are_speaking": "You're speaking",
|
"you_are_speaking": "You're speaking",
|
||||||
"practice_completed": "Practice completed",
|
"practice_completed": "Practice completed!",
|
||||||
"great_improvement": "You sound more confident this time, great improvement",
|
"great_improvement": "You sound more confident this time, great improvement",
|
||||||
"practice_again": "Practice again",
|
"practice_again": "Practice again",
|
||||||
"conversation_review": "Conversation review",
|
"conversation_review": "Conversation review",
|
||||||
|
|
@ -119,6 +119,38 @@
|
||||||
"telegram_support": "Telegram support",
|
"telegram_support": "Telegram support",
|
||||||
"chat_via_telegram" :"Chat instantly via Telegram",
|
"chat_via_telegram" :"Chat instantly via Telegram",
|
||||||
"call_our_support": "Call our support team between 9 AM - 6 PM",
|
"call_our_support": "Call our support team between 9 AM - 6 PM",
|
||||||
"tap_to_call": "Tap to call"
|
"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?",
|
||||||
|
"use_for_personalization": "We’ll use your name to personalize your learning journey."
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,9 +1,15 @@
|
||||||
import 'package:battery_plus/battery_plus.dart';
|
import 'package:battery_plus/battery_plus.dart';
|
||||||
import 'package:flutter/services.dart';
|
import 'package:flutter/services.dart';
|
||||||
import 'package:in_app_update/in_app_update.dart';
|
import 'package:in_app_update/in_app_update.dart';
|
||||||
|
import 'package:stacked_services/stacked_services.dart';
|
||||||
import 'package:storage_info/storage_info.dart';
|
import 'package:storage_info/storage_info.dart';
|
||||||
|
import 'package:yimaru_app/app/app.locator.dart';
|
||||||
|
|
||||||
|
import '../ui/common/ui_helpers.dart';
|
||||||
|
|
||||||
class InAppUpdateService {
|
class InAppUpdateService {
|
||||||
|
final _navigationService = locator<NavigationService>();
|
||||||
|
|
||||||
Future<int> getBatteryLevel() async {
|
Future<int> getBatteryLevel() async {
|
||||||
final battery = Battery();
|
final battery = Battery();
|
||||||
final batteryLevel = await battery.batteryLevel;
|
final batteryLevel = await battery.batteryLevel;
|
||||||
|
|
@ -43,7 +49,11 @@ class InAppUpdateService {
|
||||||
try {
|
try {
|
||||||
final info = await InAppUpdate.checkForUpdate();
|
final info = await InAppUpdate.checkForUpdate();
|
||||||
if (info.updateAvailability == UpdateAvailability.updateAvailable) {
|
if (info.updateAvailability == UpdateAvailability.updateAvailable) {
|
||||||
await InAppUpdate.completeFlexibleUpdate();
|
AppUpdateResult result = await InAppUpdate.performImmediateUpdate();
|
||||||
|
if (result == AppUpdateResult.userDeniedUpdate) {
|
||||||
|
showErrorToast('An update is required to continue using this app.');
|
||||||
|
_navigationService.back();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// ... rest of your update logic ...
|
// ... rest of your update logic ...
|
||||||
|
|
|
||||||
|
|
@ -135,7 +135,39 @@ class CodegenLoader extends AssetLoader{
|
||||||
"telegram_support": "የቴሌግራም ድጋፍ",
|
"telegram_support": "የቴሌግራም ድጋፍ",
|
||||||
"chat_via_telegram": "በቴሌግራም በፍጥነት ይወያዩ",
|
"chat_via_telegram": "በቴሌግራም በፍጥነት ይወያዩ",
|
||||||
"call_our_support": "ከ3 ጠዋት እስከ 12 ማታ ድረስ የድጋፍ ቡድናችንን ይደውሉ",
|
"call_our_support": "ከ3 ጠዋት እስከ 12 ማታ ድረስ የድጋፍ ቡድናችንን ይደውሉ",
|
||||||
"tap_to_call": "ለመደወል ይንኩ"
|
"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_practice": "በዚህ ደረጃ የተማርከውን በፍጥነት እንከልስ!",
|
||||||
|
"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": "ምን ብለን እንጠራህ?",
|
||||||
|
"use_for_personalization": "በመማር ጉዞህ ውስጥ ለግል ለማድረግ ስምህን እንጠቀማለን።"
|
||||||
};
|
};
|
||||||
static const Map<String,dynamic> _en = {
|
static const Map<String,dynamic> _en = {
|
||||||
"loading": "Loading",
|
"loading": "Loading",
|
||||||
|
|
@ -212,7 +244,7 @@ static const Map<String,dynamic> _en = {
|
||||||
"reply": "Reply",
|
"reply": "Reply",
|
||||||
"cancel": "Cancel",
|
"cancel": "Cancel",
|
||||||
"you_are_speaking": "You're speaking",
|
"you_are_speaking": "You're speaking",
|
||||||
"practice_completed": "Practice completed",
|
"practice_completed": "Practice completed!",
|
||||||
"great_improvement": "You sound more confident this time, great improvement",
|
"great_improvement": "You sound more confident this time, great improvement",
|
||||||
"practice_again": "Practice again",
|
"practice_again": "Practice again",
|
||||||
"conversation_review": "Conversation review",
|
"conversation_review": "Conversation review",
|
||||||
|
|
@ -258,7 +290,39 @@ static const Map<String,dynamic> _en = {
|
||||||
"telegram_support": "Telegram support",
|
"telegram_support": "Telegram support",
|
||||||
"chat_via_telegram": "Chat instantly via Telegram",
|
"chat_via_telegram": "Chat instantly via Telegram",
|
||||||
"call_our_support": "Call our support team between 9 AM - 6 PM",
|
"call_our_support": "Call our support team between 9 AM - 6 PM",
|
||||||
"tap_to_call": "Tap to call"
|
"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?",
|
||||||
|
"use_for_personalization": "We’ll use your name to personalize your learning journey."
|
||||||
};
|
};
|
||||||
static const Map<String, Map<String,dynamic>> mapLocales = {"am": _am, "en": _en};
|
static const Map<String, Map<String,dynamic>> mapLocales = {"am": _am, "en": _en};
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -122,5 +122,37 @@ abstract class LocaleKeys {
|
||||||
static const chat_via_telegram = 'chat_via_telegram';
|
static const chat_via_telegram = 'chat_via_telegram';
|
||||||
static const call_our_support = 'call_our_support';
|
static const call_our_support = 'call_our_support';
|
||||||
static const tap_to_call = 'tap_to_call';
|
static const tap_to_call = 'tap_to_call';
|
||||||
|
static const join_telegram = 'join_telegram';
|
||||||
|
static const connect_with_support_team = 'connect_with_support_team';
|
||||||
|
static const open_in_telegram = 'open_in_telegram';
|
||||||
|
static const search_for = 'search_for';
|
||||||
|
static const current_level = 'current_level';
|
||||||
|
static const keep_up_the_great_work = 'keep_up_the_great_work';
|
||||||
|
static const no_practice_available = 'no_practice_available';
|
||||||
|
static const begin_module_practice = 'begin_module_practice';
|
||||||
|
static const lets_practice_lesson = 'lets_practice_lesson';
|
||||||
|
static const lets_quickly_review = 'lets_quickly_review';
|
||||||
|
static const lets_practice_module = 'lets_practice_module';
|
||||||
|
static const ask_you_few_actions = 'ask_you_few_actions';
|
||||||
|
static const begin_level_practice = 'begin_level_practice';
|
||||||
|
static const lets_practice_course = 'lets_practice_course';
|
||||||
|
static const lets_quick_practice = 'lets_quick_practice';
|
||||||
|
static const speaking = 'speaking';
|
||||||
|
static const you_have_finished_practice = 'you_have_finished_practice';
|
||||||
|
static const view_results = 'view_results';
|
||||||
|
static const sample_answer = 'sample_answer';
|
||||||
|
static const your_answer = 'your_answer';
|
||||||
|
static const sound_confident = 'sound_confident';
|
||||||
|
static const you_have_completed = 'you_have_completed';
|
||||||
|
static const yes = 'yes';
|
||||||
|
static const no = 'no';
|
||||||
|
static const want_to_quit = 'want_to_quit';
|
||||||
|
static const required_field = 'required_field';
|
||||||
|
static const enter_full_name = 'enter_full_name';
|
||||||
|
static const invalid_email = 'invalid_email';
|
||||||
|
static const phone_must_start_with = 'phone_must_start_with';
|
||||||
|
static const phone_must_be = 'phone_must_be';
|
||||||
|
static const what_should_we_call_you = 'what_should_we_call_you';
|
||||||
|
static const use_for_personalization = 'use_for_personalization';
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,6 @@
|
||||||
|
import 'package:easy_localization/easy_localization.dart';
|
||||||
import 'package:email_validator/email_validator.dart';
|
import 'package:email_validator/email_validator.dart';
|
||||||
|
import 'package:yimaru_app/ui/common/translations/locale_keys.g.dart';
|
||||||
|
|
||||||
class FormValidator {
|
class FormValidator {
|
||||||
// Form validator
|
// Form validator
|
||||||
|
|
@ -8,7 +10,7 @@ class FormValidator {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (value.isEmpty) {
|
if (value.isEmpty) {
|
||||||
return 'The field is required';
|
return LocaleKeys.required_field.tr();
|
||||||
}
|
}
|
||||||
|
|
||||||
return null;
|
return null;
|
||||||
|
|
@ -21,12 +23,12 @@ class FormValidator {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (value.isEmpty) {
|
if (value.isEmpty) {
|
||||||
return 'The field is required';
|
return LocaleKeys.required_field.tr();
|
||||||
}
|
}
|
||||||
final regex = RegExp(r'^\S+\s+\S+.*$');
|
final regex = RegExp(r'^\S+\s+\S+.*$');
|
||||||
|
|
||||||
if (!regex.hasMatch(value.trim())) {
|
if (!regex.hasMatch(value.trim())) {
|
||||||
return "Enter your full name";
|
return LocaleKeys.enter_full_name.tr();
|
||||||
}
|
}
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
@ -38,11 +40,11 @@ class FormValidator {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (value.isEmpty) {
|
if (value.isEmpty) {
|
||||||
return 'The field is required';
|
return LocaleKeys.required_field.tr();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!EmailValidator.validate(value)) {
|
if (!EmailValidator.validate(value)) {
|
||||||
return 'Invalid email format';
|
return LocaleKeys.invalid_email.tr();
|
||||||
}
|
}
|
||||||
|
|
||||||
return null;
|
return null;
|
||||||
|
|
@ -55,7 +57,7 @@ class FormValidator {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (value.isEmpty) {
|
if (value.isEmpty) {
|
||||||
return 'The field is required';
|
return LocaleKeys.required_field.tr();
|
||||||
}
|
}
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
@ -67,19 +69,19 @@ class FormValidator {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (value.isEmpty) {
|
if (value.isEmpty) {
|
||||||
return 'The field is required';
|
return LocaleKeys.required_field.tr();
|
||||||
}
|
}
|
||||||
|
|
||||||
// Regex validation
|
// Regex validation
|
||||||
final regex = RegExp(r'^251');
|
final regex = RegExp(r'^251');
|
||||||
|
|
||||||
if (!regex.hasMatch(value)) {
|
if (!regex.hasMatch(value)) {
|
||||||
return 'Phone number must start with 251';
|
return LocaleKeys.phone_must_start_with.tr();
|
||||||
}
|
}
|
||||||
|
|
||||||
// Length check first (optional but recommended)
|
// Length check first (optional but recommended)
|
||||||
if (value.length != 12) {
|
if (value.length != 12) {
|
||||||
return 'Phone number must be 12 digits';
|
return LocaleKeys.phone_must_be.tr();
|
||||||
}
|
}
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -6,6 +6,7 @@ import 'package:yimaru_app/ui/common/translations/locale_keys.g.dart';
|
||||||
import 'package:yimaru_app/ui/views/learn_program/learn_program_view.dart';
|
import 'package:yimaru_app/ui/views/learn_program/learn_program_view.dart';
|
||||||
import 'package:yimaru_app/ui/views/profile/profile_view.dart';
|
import 'package:yimaru_app/ui/views/profile/profile_view.dart';
|
||||||
|
|
||||||
|
import '../../widgets/coming_soon.dart';
|
||||||
import '../course/course_view.dart';
|
import '../course/course_view.dart';
|
||||||
import 'home_viewmodel.dart';
|
import 'home_viewmodel.dart';
|
||||||
|
|
||||||
|
|
@ -71,7 +72,7 @@ class HomeView extends StackedView<HomeViewModel> {
|
||||||
case 0:
|
case 0:
|
||||||
return const LearnProgramView();
|
return const LearnProgramView();
|
||||||
case 1:
|
case 1:
|
||||||
return const CourseView();
|
return const ComingSoon();
|
||||||
|
|
||||||
default:
|
default:
|
||||||
return const ProfileView();
|
return const ProfileView();
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,4 @@
|
||||||
|
import 'package:easy_localization/easy_localization.dart';
|
||||||
import 'package:stacked/stacked.dart';
|
import 'package:stacked/stacked.dart';
|
||||||
import 'package:stacked_services/stacked_services.dart';
|
import 'package:stacked_services/stacked_services.dart';
|
||||||
import 'package:yimaru_app/app/app.router.dart';
|
import 'package:yimaru_app/app/app.router.dart';
|
||||||
|
|
@ -7,6 +8,7 @@ import '../../../models/learn_course.dart';
|
||||||
import '../../../services/learn_service.dart';
|
import '../../../services/learn_service.dart';
|
||||||
import '../../../services/status_checker_service.dart';
|
import '../../../services/status_checker_service.dart';
|
||||||
import '../../common/enmus.dart';
|
import '../../common/enmus.dart';
|
||||||
|
import '../../common/translations/locale_keys.g.dart';
|
||||||
|
|
||||||
class LearnCourseViewModel extends ReactiveViewModel {
|
class LearnCourseViewModel extends ReactiveViewModel {
|
||||||
// Dependency injection
|
// Dependency injection
|
||||||
|
|
@ -35,10 +37,10 @@ class LearnCourseViewModel extends ReactiveViewModel {
|
||||||
await _navigationService.navigateToLearnPracticeView(
|
await _navigationService.navigateToLearnPracticeView(
|
||||||
id: id,
|
id: id,
|
||||||
level: level,
|
level: level,
|
||||||
label: 'Begin Level Practice',
|
|
||||||
practice: LearnPractices.course,
|
practice: LearnPractices.course,
|
||||||
title: 'Let’s Practice Course $level',
|
label: LocaleKeys.begin_level_practice.tr(),
|
||||||
subtitle: 'Let’s quickly review what you’ve learned in this level!',
|
subtitle: LocaleKeys.lets_quick_practice.tr(),
|
||||||
|
title: '${LocaleKeys.lets_practice_course.tr()} $level',
|
||||||
);
|
);
|
||||||
|
|
||||||
// Remote api call
|
// Remote api call
|
||||||
|
|
|
||||||
|
|
@ -1,8 +1,10 @@
|
||||||
|
import 'package:easy_localization/easy_localization.dart';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:stacked/stacked.dart';
|
import 'package:stacked/stacked.dart';
|
||||||
import 'package:yimaru_app/models/learn_lesson.dart';
|
import 'package:yimaru_app/models/learn_lesson.dart';
|
||||||
import 'package:yimaru_app/models/learn_module.dart';
|
import 'package:yimaru_app/models/learn_module.dart';
|
||||||
import 'package:yimaru_app/ui/common/enmus.dart';
|
import 'package:yimaru_app/ui/common/enmus.dart';
|
||||||
|
import 'package:yimaru_app/ui/common/translations/locale_keys.g.dart';
|
||||||
import 'package:yimaru_app/ui/widgets/learn_lesson_tile.dart';
|
import 'package:yimaru_app/ui/widgets/learn_lesson_tile.dart';
|
||||||
import 'package:yimaru_app/ui/widgets/module_progress.dart';
|
import 'package:yimaru_app/ui/widgets/module_progress.dart';
|
||||||
import 'package:yimaru_app/ui/widgets/motivation_card.dart';
|
import 'package:yimaru_app/ui/widgets/motivation_card.dart';
|
||||||
|
|
@ -150,7 +152,7 @@ class LearnLessonView extends StackedView<LearnLessonViewModel> {
|
||||||
Widget _buildMotivationCard() => const MotivationCard();
|
Widget _buildMotivationCard() => const MotivationCard();
|
||||||
|
|
||||||
Widget _buildHeader() => Text(
|
Widget _buildHeader() => Text(
|
||||||
'Lessons in this module',
|
LocaleKeys.lessons_in_module.tr(),
|
||||||
style: style18DG700,
|
style: style18DG700,
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,8 +1,10 @@
|
||||||
|
import 'package:easy_localization/easy_localization.dart';
|
||||||
import 'package:stacked/stacked.dart';
|
import 'package:stacked/stacked.dart';
|
||||||
import 'package:stacked_services/stacked_services.dart';
|
import 'package:stacked_services/stacked_services.dart';
|
||||||
import 'package:yimaru_app/app/app.router.dart';
|
import 'package:yimaru_app/app/app.router.dart';
|
||||||
import 'package:yimaru_app/models/learn_lesson.dart';
|
import 'package:yimaru_app/models/learn_lesson.dart';
|
||||||
import 'package:yimaru_app/ui/common/enmus.dart';
|
import 'package:yimaru_app/ui/common/enmus.dart';
|
||||||
|
import 'package:yimaru_app/ui/common/translations/locale_keys.g.dart';
|
||||||
|
|
||||||
import '../../../app/app.locator.dart';
|
import '../../../app/app.locator.dart';
|
||||||
import '../../../models/learn_module.dart';
|
import '../../../models/learn_module.dart';
|
||||||
|
|
@ -31,11 +33,10 @@ class LearnLessonViewModel extends ReactiveViewModel {
|
||||||
Future<void> navigateToLearnPractice(int id) async =>
|
Future<void> navigateToLearnPractice(int id) async =>
|
||||||
await _navigationService.navigateToLearnPracticeView(
|
await _navigationService.navigateToLearnPracticeView(
|
||||||
id: id,
|
id: id,
|
||||||
label: 'Start Practice',
|
|
||||||
practice: LearnPractices.lesson,
|
practice: LearnPractices.lesson,
|
||||||
title: 'Let\'s practice what you just learnt!',
|
label:LocaleKeys.start_practice.tr(),
|
||||||
subtitle:
|
title: LocaleKeys.lets_practice_module.tr(),
|
||||||
'I’ll ask you a few questions, and you can respond naturally.',
|
subtitle:LocaleKeys.ask_you_few_actions.tr(),
|
||||||
);
|
);
|
||||||
|
|
||||||
Future<void> navigateToLearnLessonDetail(
|
Future<void> navigateToLearnLessonDetail(
|
||||||
|
|
|
||||||
|
|
@ -1,8 +1,10 @@
|
||||||
import 'package:chewie/chewie.dart';
|
import 'package:chewie/chewie.dart';
|
||||||
|
import 'package:easy_localization/easy_localization.dart';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:stacked/stacked.dart';
|
import 'package:stacked/stacked.dart';
|
||||||
import 'package:yimaru_app/models/learn_lesson.dart';
|
import 'package:yimaru_app/models/learn_lesson.dart';
|
||||||
import 'package:yimaru_app/models/learn_module.dart';
|
import 'package:yimaru_app/models/learn_module.dart';
|
||||||
|
import 'package:yimaru_app/ui/common/translations/locale_keys.g.dart';
|
||||||
|
|
||||||
import '../../common/app_colors.dart';
|
import '../../common/app_colors.dart';
|
||||||
import '../../common/enmus.dart';
|
import '../../common/enmus.dart';
|
||||||
|
|
@ -188,9 +190,9 @@ class LearnLessonDetailView extends StackedView<LearnLessonDetailViewModel> {
|
||||||
CustomElevatedButton(
|
CustomElevatedButton(
|
||||||
height: 55,
|
height: 55,
|
||||||
borderRadius: 12,
|
borderRadius: 12,
|
||||||
text: 'Take Practice',
|
|
||||||
foregroundColor: kcWhite,
|
foregroundColor: kcWhite,
|
||||||
backgroundColor: kcPrimaryColor,
|
backgroundColor: kcPrimaryColor,
|
||||||
|
text:LocaleKeys.take_practice.tr() ,
|
||||||
onTap: () async => await _navigate(viewModel),
|
onTap: () async => await _navigate(viewModel),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,8 @@
|
||||||
|
import 'package:easy_localization/easy_localization.dart';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:stacked/stacked.dart';
|
import 'package:stacked/stacked.dart';
|
||||||
import 'package:yimaru_app/models/learn_module.dart';
|
import 'package:yimaru_app/models/learn_module.dart';
|
||||||
|
import 'package:yimaru_app/ui/common/translations/locale_keys.g.dart';
|
||||||
import 'package:yimaru_app/ui/widgets/learn_module_tile.dart';
|
import 'package:yimaru_app/ui/widgets/learn_module_tile.dart';
|
||||||
import 'package:yimaru_app/ui/widgets/overall_progress.dart';
|
import 'package:yimaru_app/ui/widgets/overall_progress.dart';
|
||||||
|
|
||||||
|
|
@ -97,7 +99,7 @@ class LearnModuleView extends StackedView<LearnModuleViewModel> {
|
||||||
);
|
);
|
||||||
|
|
||||||
Widget _buildSubtitle() => Text(
|
Widget _buildSubtitle() => Text(
|
||||||
'Your Current Level',
|
LocaleKeys.your_current_level.tr(),
|
||||||
style: style14P400,
|
style: style14P400,
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,9 @@
|
||||||
|
import 'package:easy_localization/easy_localization.dart';
|
||||||
import 'package:stacked/stacked.dart';
|
import 'package:stacked/stacked.dart';
|
||||||
import 'package:stacked_services/stacked_services.dart';
|
import 'package:stacked_services/stacked_services.dart';
|
||||||
import 'package:yimaru_app/app/app.router.dart';
|
import 'package:yimaru_app/app/app.router.dart';
|
||||||
import 'package:yimaru_app/models/learn_module.dart';
|
import 'package:yimaru_app/models/learn_module.dart';
|
||||||
|
import 'package:yimaru_app/ui/common/translations/locale_keys.g.dart';
|
||||||
|
|
||||||
import '../../../app/app.locator.dart';
|
import '../../../app/app.locator.dart';
|
||||||
import '../../../services/learn_service.dart';
|
import '../../../services/learn_service.dart';
|
||||||
|
|
@ -36,10 +38,10 @@ class LearnModuleViewModel extends ReactiveViewModel {
|
||||||
{required int id, required String module}) async =>
|
{required int id, required String module}) async =>
|
||||||
await _navigationService.navigateToLearnPracticeView(
|
await _navigationService.navigateToLearnPracticeView(
|
||||||
id: id,
|
id: id,
|
||||||
label: 'Begin Module Practice',
|
|
||||||
practice: LearnPractices.module,
|
practice: LearnPractices.module,
|
||||||
title: 'Let’s Practice $module',
|
label: LocaleKeys.begin_module_practice.tr(),
|
||||||
subtitle: 'Let’s quickly review what you’ve learned in this module! ',
|
subtitle: LocaleKeys.lets_quickly_review.tr(),
|
||||||
|
title: '${LocaleKeys.lets_practice_module.tr()} $module',
|
||||||
);
|
);
|
||||||
|
|
||||||
// Remote api call
|
// Remote api call
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,5 @@
|
||||||
import 'package:audioplayers/audioplayers.dart';
|
import 'package:audioplayers/audioplayers.dart';
|
||||||
|
import 'package:easy_localization/easy_localization.dart';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:flutter_spinkit/flutter_spinkit.dart';
|
import 'package:flutter_spinkit/flutter_spinkit.dart';
|
||||||
import 'package:stacked/stacked.dart';
|
import 'package:stacked/stacked.dart';
|
||||||
|
|
@ -12,6 +13,7 @@ import 'package:yimaru_app/ui/widgets/wave_wrapper.dart';
|
||||||
import '../../../../models/learn_question.dart';
|
import '../../../../models/learn_question.dart';
|
||||||
import '../../../common/app_colors.dart';
|
import '../../../common/app_colors.dart';
|
||||||
import '../../../common/enmus.dart';
|
import '../../../common/enmus.dart';
|
||||||
|
import '../../../common/translations/locale_keys.g.dart';
|
||||||
import '../../../common/ui_helpers.dart';
|
import '../../../common/ui_helpers.dart';
|
||||||
import '../../../widgets/custom_column_button.dart';
|
import '../../../widgets/custom_column_button.dart';
|
||||||
import '../../../widgets/small_app_bar.dart';
|
import '../../../widgets/small_app_bar.dart';
|
||||||
|
|
@ -125,7 +127,7 @@ class InteractLearnPracticeScreen
|
||||||
showBackButton: true,
|
showBackButton: true,
|
||||||
onPop: () async =>
|
onPop: () async =>
|
||||||
await _showSheet(context: context, viewModel: viewModel),
|
await _showSheet(context: context, viewModel: viewModel),
|
||||||
title: 'Practice Speaking ($index/${viewModel.questions.length})');
|
title: '${LocaleKeys.practice_speaking.tr()} ($index/${viewModel.questions.length})');
|
||||||
|
|
||||||
Widget _buildSpeakingIndicatorWrapper(LearnPracticeViewModel viewModel) =>
|
Widget _buildSpeakingIndicatorWrapper(LearnPracticeViewModel viewModel) =>
|
||||||
Column(
|
Column(
|
||||||
|
|
@ -152,13 +154,13 @@ class InteractLearnPracticeScreen
|
||||||
: const SizedBox(height: 20);
|
: const SizedBox(height: 20);
|
||||||
|
|
||||||
Widget _buildListeningLabel() => Text(
|
Widget _buildListeningLabel() => Text(
|
||||||
'Daniel is speaking...',
|
'Daniel ${LocaleKeys.speaking.tr()}',
|
||||||
style: style14P400,
|
style: style14P400,
|
||||||
textAlign: TextAlign.center,
|
textAlign: TextAlign.center,
|
||||||
);
|
);
|
||||||
|
|
||||||
Widget _buildSpeakingLabel() => Text(
|
Widget _buildSpeakingLabel() => Text(
|
||||||
'You\'re speaking...',
|
'${ LocaleKeys.you_are_speaking.tr()}...',
|
||||||
style: style14P400,
|
style: style14P400,
|
||||||
textAlign: TextAlign.center,
|
textAlign: TextAlign.center,
|
||||||
);
|
);
|
||||||
|
|
@ -237,7 +239,7 @@ class InteractLearnPracticeScreen
|
||||||
];
|
];
|
||||||
|
|
||||||
Widget _buildActionLabel() => Text(
|
Widget _buildActionLabel() => Text(
|
||||||
'Tap the microphone to speak',
|
LocaleKeys.tap_microphone.tr(),
|
||||||
style: style14DG400,
|
style: style14DG400,
|
||||||
textAlign: TextAlign.center,
|
textAlign: TextAlign.center,
|
||||||
);
|
);
|
||||||
|
|
@ -288,7 +290,7 @@ class InteractLearnPracticeScreen
|
||||||
Widget _buildReplyButton(LearnPracticeViewModel viewModel) =>
|
Widget _buildReplyButton(LearnPracticeViewModel viewModel) =>
|
||||||
CustomColumnButton(
|
CustomColumnButton(
|
||||||
icon: Icons.replay,
|
icon: Icons.replay,
|
||||||
label: 'Reply',
|
label: LocaleKeys.reply.tr(),
|
||||||
color: viewModel.recordingState == VoiceRecordingState.pending &&
|
color: viewModel.recordingState == VoiceRecordingState.pending &&
|
||||||
viewModel.player.state != PlayerState.playing
|
viewModel.player.state != PlayerState.playing
|
||||||
? kcPrimaryColor
|
? kcPrimaryColor
|
||||||
|
|
@ -356,8 +358,8 @@ class InteractLearnPracticeScreen
|
||||||
required LearnPracticeViewModel viewModel}) =>
|
required LearnPracticeViewModel viewModel}) =>
|
||||||
CustomColumnButton(
|
CustomColumnButton(
|
||||||
color: kcRed,
|
color: kcRed,
|
||||||
label: 'Cancel',
|
|
||||||
icon: Icons.close,
|
icon: Icons.close,
|
||||||
|
label:LocaleKeys.cancel.tr() ,
|
||||||
onTap: () async =>
|
onTap: () async =>
|
||||||
await _showSheet(context: context, viewModel: viewModel),
|
await _showSheet(context: context, viewModel: viewModel),
|
||||||
);
|
);
|
||||||
|
|
|
||||||
|
|
@ -1,9 +1,11 @@
|
||||||
|
import 'package:easy_localization/easy_localization.dart';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:yimaru_app/ui/widgets/no_data_indicator.dart';
|
import 'package:yimaru_app/ui/widgets/no_data_indicator.dart';
|
||||||
import 'package:yimaru_app/ui/widgets/page_loading_indicator.dart';
|
import 'package:yimaru_app/ui/widgets/page_loading_indicator.dart';
|
||||||
import 'package:yimaru_app/ui/widgets/small_app_bar.dart';
|
import 'package:yimaru_app/ui/widgets/small_app_bar.dart';
|
||||||
|
|
||||||
import '../../../common/app_colors.dart';
|
import '../../../common/app_colors.dart';
|
||||||
|
import '../../../common/translations/locale_keys.g.dart';
|
||||||
import '../../../common/ui_helpers.dart';
|
import '../../../common/ui_helpers.dart';
|
||||||
|
|
||||||
class LearnLoadingScreen extends StatelessWidget {
|
class LearnLoadingScreen extends StatelessWidget {
|
||||||
|
|
@ -65,7 +67,7 @@ class LearnLoadingScreen extends StatelessWidget {
|
||||||
Align(alignment: Alignment.center, child: _buildRefreshButton());
|
Align(alignment: Alignment.center, child: _buildRefreshButton());
|
||||||
|
|
||||||
Widget _buildRefreshButton() => NoDataIndicator(
|
Widget _buildRefreshButton() => NoDataIndicator(
|
||||||
title: 'No practice available!',
|
onTap: onTap,
|
||||||
onTap: onTap,
|
title: LocaleKeys.no_practice_available.tr(),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,8 @@
|
||||||
|
import 'package:easy_localization/easy_localization.dart';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:flutter_svg/svg.dart';
|
import 'package:flutter_svg/svg.dart';
|
||||||
import 'package:stacked/stacked.dart';
|
import 'package:stacked/stacked.dart';
|
||||||
|
import 'package:yimaru_app/ui/common/translations/locale_keys.g.dart';
|
||||||
import 'package:yimaru_app/ui/views/learn_practice/learn_practice_viewmodel.dart';
|
import 'package:yimaru_app/ui/views/learn_practice/learn_practice_viewmodel.dart';
|
||||||
|
|
||||||
import '../../../common/app_colors.dart';
|
import '../../../common/app_colors.dart';
|
||||||
|
|
@ -131,13 +133,13 @@ class LearnPracticeAppreciationScreen
|
||||||
Widget _buildIcon() => SvgPicture.asset('assets/icons/success.svg');
|
Widget _buildIcon() => SvgPicture.asset('assets/icons/success.svg');
|
||||||
|
|
||||||
Widget _buildTitle(LearnPracticeViewModel viewModel) => Text(
|
Widget _buildTitle(LearnPracticeViewModel viewModel) => Text(
|
||||||
'Great work, ${viewModel.user?.firstName}',
|
'${LocaleKeys.great_work.tr()}, ${viewModel.user?.firstName}',
|
||||||
style: style25DG600,
|
style: style25DG600,
|
||||||
textAlign: TextAlign.center,
|
textAlign: TextAlign.center,
|
||||||
);
|
);
|
||||||
|
|
||||||
Widget _buildSubtitle() => Text(
|
Widget _buildSubtitle() => Text(
|
||||||
'You have finished your practice',
|
LocaleKeys.you_have_finished_practice.tr(),
|
||||||
style: style14DG400,
|
style: style14DG400,
|
||||||
textAlign: TextAlign.center,
|
textAlign: TextAlign.center,
|
||||||
);
|
);
|
||||||
|
|
@ -152,9 +154,10 @@ class LearnPracticeAppreciationScreen
|
||||||
CustomElevatedButton(
|
CustomElevatedButton(
|
||||||
height: 55,
|
height: 55,
|
||||||
borderRadius: 12,
|
borderRadius: 12,
|
||||||
text: 'View My Results',
|
|
||||||
foregroundColor: kcWhite,
|
foregroundColor: kcWhite,
|
||||||
onTap: () => viewModel.goTo(4),
|
onTap: () => viewModel.goTo(4),
|
||||||
backgroundColor: kcPrimaryColor,
|
backgroundColor: kcPrimaryColor,
|
||||||
|
text: LocaleKeys.view_results.tr(),
|
||||||
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,8 @@
|
||||||
|
import 'package:easy_localization/easy_localization.dart';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:flutter_svg/svg.dart';
|
import 'package:flutter_svg/svg.dart';
|
||||||
import 'package:stacked/stacked.dart';
|
import 'package:stacked/stacked.dart';
|
||||||
|
import 'package:yimaru_app/ui/common/translations/locale_keys.g.dart';
|
||||||
import 'package:yimaru_app/ui/views/learn_practice/learn_practice_viewmodel.dart';
|
import 'package:yimaru_app/ui/views/learn_practice/learn_practice_viewmodel.dart';
|
||||||
|
|
||||||
import '../../../common/app_colors.dart';
|
import '../../../common/app_colors.dart';
|
||||||
|
|
@ -61,7 +63,7 @@ class LearnPracticeCompletionScreen
|
||||||
);
|
);
|
||||||
|
|
||||||
Widget _buildTitle() => Text(
|
Widget _buildTitle() => Text(
|
||||||
'Yay, you’ve completed $level ',
|
'${LocaleKeys.you_have_completed.tr()} $level ',
|
||||||
style: style25DG600,
|
style: style25DG600,
|
||||||
textAlign: TextAlign.center,
|
textAlign: TextAlign.center,
|
||||||
);
|
);
|
||||||
|
|
@ -81,9 +83,9 @@ class LearnPracticeCompletionScreen
|
||||||
CustomElevatedButton(
|
CustomElevatedButton(
|
||||||
height: 55,
|
height: 55,
|
||||||
borderRadius: 12,
|
borderRadius: 12,
|
||||||
text: 'Continue',
|
|
||||||
onTap: viewModel.pop,
|
onTap: viewModel.pop,
|
||||||
foregroundColor: kcWhite,
|
foregroundColor: kcWhite,
|
||||||
|
text: LocaleKeys.cont.tr(),
|
||||||
backgroundColor: kcPrimaryColor,
|
backgroundColor: kcPrimaryColor,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,10 +1,12 @@
|
||||||
import 'package:cached_network_image/cached_network_image.dart';
|
import 'package:cached_network_image/cached_network_image.dart';
|
||||||
|
import 'package:easy_localization/easy_localization.dart';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:stacked/stacked.dart';
|
import 'package:stacked/stacked.dart';
|
||||||
import 'package:yimaru_app/ui/common/helper_functions.dart';
|
import 'package:yimaru_app/ui/common/helper_functions.dart';
|
||||||
import 'package:yimaru_app/ui/views/learn_practice/learn_practice_viewmodel.dart';
|
import 'package:yimaru_app/ui/views/learn_practice/learn_practice_viewmodel.dart';
|
||||||
|
|
||||||
import '../../../common/app_colors.dart';
|
import '../../../common/app_colors.dart';
|
||||||
|
import '../../../common/translations/locale_keys.g.dart';
|
||||||
import '../../../common/ui_helpers.dart';
|
import '../../../common/ui_helpers.dart';
|
||||||
import '../../../widgets/cancel_learn_practice_sheet.dart';
|
import '../../../widgets/cancel_learn_practice_sheet.dart';
|
||||||
import '../../../widgets/custom_elevated_button.dart';
|
import '../../../widgets/custom_elevated_button.dart';
|
||||||
|
|
@ -175,9 +177,9 @@ class LearnPracticeDescriptionScreen
|
||||||
CustomElevatedButton(
|
CustomElevatedButton(
|
||||||
height: 55,
|
height: 55,
|
||||||
borderRadius: 12,
|
borderRadius: 12,
|
||||||
text: 'Start Practice',
|
|
||||||
foregroundColor: kcWhite,
|
foregroundColor: kcWhite,
|
||||||
onTap: () => viewModel.goTo(2),
|
onTap: () => viewModel.goTo(2),
|
||||||
backgroundColor: kcPrimaryColor,
|
backgroundColor: kcPrimaryColor,
|
||||||
|
text: LocaleKeys.start_practice.tr() ,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,8 @@
|
||||||
|
import 'package:easy_localization/easy_localization.dart';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:flutter_svg/svg.dart';
|
import 'package:flutter_svg/svg.dart';
|
||||||
import 'package:stacked/stacked.dart';
|
import 'package:stacked/stacked.dart';
|
||||||
|
import 'package:yimaru_app/ui/common/translations/locale_keys.g.dart';
|
||||||
import 'package:yimaru_app/ui/views/learn_practice/learn_practice_viewmodel.dart';
|
import 'package:yimaru_app/ui/views/learn_practice/learn_practice_viewmodel.dart';
|
||||||
|
|
||||||
import '../../../common/app_colors.dart';
|
import '../../../common/app_colors.dart';
|
||||||
|
|
@ -59,7 +61,7 @@ class LearnPracticeFinishScreen
|
||||||
Widget _buildAppBar(LearnPracticeViewModel viewModel) => SmallAppBar(
|
Widget _buildAppBar(LearnPracticeViewModel viewModel) => SmallAppBar(
|
||||||
showBackButton: true,
|
showBackButton: true,
|
||||||
onPop: viewModel.goBack,
|
onPop: viewModel.goBack,
|
||||||
title: 'Practice Speaking',
|
title:LocaleKeys.practice_speaking.tr(),
|
||||||
);
|
);
|
||||||
|
|
||||||
Widget _buildSpeakingIndicatorWrapper(LearnPracticeViewModel viewModel) =>
|
Widget _buildSpeakingIndicatorWrapper(LearnPracticeViewModel viewModel) =>
|
||||||
|
|
@ -79,13 +81,13 @@ class LearnPracticeFinishScreen
|
||||||
Widget _buildIcon() => SvgPicture.asset('assets/icons/success.svg');
|
Widget _buildIcon() => SvgPicture.asset('assets/icons/success.svg');
|
||||||
|
|
||||||
Widget _buildTitle() => Text(
|
Widget _buildTitle() => Text(
|
||||||
'Practice Completed!',
|
LocaleKeys.practice_completed.tr(),
|
||||||
style: style25DG600,
|
style: style25DG600,
|
||||||
textAlign: TextAlign.center,
|
textAlign: TextAlign.center,
|
||||||
);
|
);
|
||||||
|
|
||||||
Widget _buildSubtitle() => Text(
|
Widget _buildSubtitle() => Text(
|
||||||
'You sound more confident this time - great improvement!',
|
LocaleKeys.sound_confident.tr() ,
|
||||||
style: style14DG400,
|
style: style14DG400,
|
||||||
textAlign: TextAlign.center,
|
textAlign: TextAlign.center,
|
||||||
);
|
);
|
||||||
|
|
@ -117,18 +119,18 @@ class LearnPracticeFinishScreen
|
||||||
borderRadius: 12,
|
borderRadius: 12,
|
||||||
onTap: viewModel.pop,
|
onTap: viewModel.pop,
|
||||||
foregroundColor: kcWhite,
|
foregroundColor: kcWhite,
|
||||||
text: 'Continue Practice',
|
|
||||||
backgroundColor: kcPrimaryColor,
|
backgroundColor: kcPrimaryColor,
|
||||||
|
text: LocaleKeys.continue_practice.tr() ,
|
||||||
);
|
);
|
||||||
|
|
||||||
Widget _buildPracticeAgainButton(LearnPracticeViewModel viewModel) =>
|
Widget _buildPracticeAgainButton(LearnPracticeViewModel viewModel) =>
|
||||||
CustomElevatedButton(
|
CustomElevatedButton(
|
||||||
height: 55,
|
height: 55,
|
||||||
borderRadius: 12,
|
borderRadius: 12,
|
||||||
text: 'Practice Again',
|
|
||||||
backgroundColor: kcWhite,
|
backgroundColor: kcWhite,
|
||||||
borderColor: kcPrimaryColor,
|
borderColor: kcPrimaryColor,
|
||||||
foregroundColor: kcPrimaryColor,
|
foregroundColor: kcPrimaryColor,
|
||||||
|
text: LocaleKeys.practice_again.tr(),
|
||||||
onTap: () async => await _reset(viewModel),
|
onTap: () async => await _reset(viewModel),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,7 @@
|
||||||
|
import 'package:easy_localization/easy_localization.dart';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:stacked/stacked.dart';
|
import 'package:stacked/stacked.dart';
|
||||||
|
import 'package:yimaru_app/ui/common/translations/locale_keys.g.dart';
|
||||||
import 'package:yimaru_app/ui/views/learn_practice/learn_practice_viewmodel.dart';
|
import 'package:yimaru_app/ui/views/learn_practice/learn_practice_viewmodel.dart';
|
||||||
|
|
||||||
import '../../../common/app_colors.dart';
|
import '../../../common/app_colors.dart';
|
||||||
|
|
@ -174,7 +176,7 @@ class LearnPracticeIntroScreen extends ViewModelWidget<LearnPracticeViewModel> {
|
||||||
Widget _buildPartnerName() => Text.rich(
|
Widget _buildPartnerName() => Text.rich(
|
||||||
TextSpan(text: 'Daniel', style: style14DG600, children: [
|
TextSpan(text: 'Daniel', style: style14DG600, children: [
|
||||||
TextSpan(
|
TextSpan(
|
||||||
text: ' - Your Speaking Partner',
|
text: ' - ${LocaleKeys.speaking_partner.tr()}',
|
||||||
style: style14MG400,
|
style: style14MG400,
|
||||||
)
|
)
|
||||||
]),
|
]),
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,8 @@
|
||||||
|
import 'package:easy_localization/easy_localization.dart';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:stacked/stacked.dart';
|
import 'package:stacked/stacked.dart';
|
||||||
import 'package:yimaru_app/ui/common/enmus.dart';
|
import 'package:yimaru_app/ui/common/enmus.dart';
|
||||||
|
import 'package:yimaru_app/ui/common/translations/locale_keys.g.dart';
|
||||||
import 'package:yimaru_app/ui/views/learn_practice/learn_practice_viewmodel.dart';
|
import 'package:yimaru_app/ui/views/learn_practice/learn_practice_viewmodel.dart';
|
||||||
import 'package:yimaru_app/ui/widgets/learn_practice_tip_section.dart';
|
import 'package:yimaru_app/ui/widgets/learn_practice_tip_section.dart';
|
||||||
import 'package:yimaru_app/ui/widgets/learn_practice_results_wrapper.dart';
|
import 'package:yimaru_app/ui/widgets/learn_practice_results_wrapper.dart';
|
||||||
|
|
@ -112,8 +114,8 @@ class LearnPracticeResultScreen
|
||||||
{required BuildContext context,
|
{required BuildContext context,
|
||||||
required LearnPracticeViewModel viewModel}) =>
|
required LearnPracticeViewModel viewModel}) =>
|
||||||
SmallAppBar(
|
SmallAppBar(
|
||||||
title: 'Result',
|
|
||||||
showBackButton: true,
|
showBackButton: true,
|
||||||
|
title:LocaleKeys.result.tr(),
|
||||||
onPop: () async =>
|
onPop: () async =>
|
||||||
await _showSheet(context: context, viewModel: viewModel),
|
await _showSheet(context: context, viewModel: viewModel),
|
||||||
);
|
);
|
||||||
|
|
@ -172,9 +174,9 @@ class LearnPracticeResultScreen
|
||||||
Widget _buildContinueButton(LearnPracticeViewModel viewModel) =>
|
Widget _buildContinueButton(LearnPracticeViewModel viewModel) =>
|
||||||
CustomElevatedButton(
|
CustomElevatedButton(
|
||||||
height: 55,
|
height: 55,
|
||||||
text: 'Continue',
|
|
||||||
borderRadius: 12,
|
borderRadius: 12,
|
||||||
foregroundColor: kcWhite,
|
foregroundColor: kcWhite,
|
||||||
|
text:LocaleKeys.cont.tr(),
|
||||||
backgroundColor: kcPrimaryColor,
|
backgroundColor: kcPrimaryColor,
|
||||||
onTap: () async => await _navigate(viewModel),
|
onTap: () async => await _navigate(viewModel),
|
||||||
);
|
);
|
||||||
|
|
@ -182,10 +184,10 @@ class LearnPracticeResultScreen
|
||||||
Widget _buildPracticeAgainButton(LearnPracticeViewModel viewModel) =>
|
Widget _buildPracticeAgainButton(LearnPracticeViewModel viewModel) =>
|
||||||
CustomElevatedButton(
|
CustomElevatedButton(
|
||||||
height: 55,
|
height: 55,
|
||||||
text: 'Retry',
|
|
||||||
borderRadius: 12,
|
borderRadius: 12,
|
||||||
backgroundColor: kcWhite,
|
backgroundColor: kcWhite,
|
||||||
borderColor: kcPrimaryColor,
|
borderColor: kcPrimaryColor,
|
||||||
|
text: LocaleKeys.retry.tr(),
|
||||||
foregroundColor: kcPrimaryColor,
|
foregroundColor: kcPrimaryColor,
|
||||||
onTap: () async => await _retry(viewModel),
|
onTap: () async => await _retry(viewModel),
|
||||||
);
|
);
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,7 @@
|
||||||
|
import 'package:easy_localization/easy_localization.dart';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:stacked/stacked.dart';
|
import 'package:stacked/stacked.dart';
|
||||||
|
import 'package:yimaru_app/ui/common/translations/locale_keys.g.dart';
|
||||||
import 'package:yimaru_app/ui/views/learn_practice/learn_practice_viewmodel.dart';
|
import 'package:yimaru_app/ui/views/learn_practice/learn_practice_viewmodel.dart';
|
||||||
import 'package:yimaru_app/ui/widgets/custom_column_button.dart';
|
import 'package:yimaru_app/ui/widgets/custom_column_button.dart';
|
||||||
|
|
||||||
|
|
@ -106,7 +108,8 @@ class StartLearnPracticeScreen extends ViewModelWidget<LearnPracticeViewModel> {
|
||||||
showBackButton: true,
|
showBackButton: true,
|
||||||
onPop: () async =>
|
onPop: () async =>
|
||||||
await _showSheet(context: context, viewModel: viewModel),
|
await _showSheet(context: context, viewModel: viewModel),
|
||||||
title: 'Practice Speaking ($index/${viewModel.questions.length})');
|
title:
|
||||||
|
'${LocaleKeys.practice_speaking.tr()} ($index/${viewModel.questions.length})');
|
||||||
|
|
||||||
Widget _buildSheet(LearnPracticeViewModel viewModel) =>
|
Widget _buildSheet(LearnPracticeViewModel viewModel) =>
|
||||||
CancelLearnPracticeSheet(
|
CancelLearnPracticeSheet(
|
||||||
|
|
@ -167,7 +170,7 @@ class StartLearnPracticeScreen extends ViewModelWidget<LearnPracticeViewModel> {
|
||||||
);
|
);
|
||||||
|
|
||||||
Widget _buildStartText() => Text(
|
Widget _buildStartText() => Text(
|
||||||
'Start',
|
LocaleKeys.start.tr(),
|
||||||
style: style25W600,
|
style: style25W600,
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
@ -193,7 +196,7 @@ class StartLearnPracticeScreen extends ViewModelWidget<LearnPracticeViewModel> {
|
||||||
];
|
];
|
||||||
|
|
||||||
Widget _buildActionLabel() => Text(
|
Widget _buildActionLabel() => Text(
|
||||||
'Tap the start button to listen',
|
LocaleKeys.tap_start_to_listen.tr() ,
|
||||||
style: style14DG400,
|
style: style14DG400,
|
||||||
textAlign: TextAlign.center,
|
textAlign: TextAlign.center,
|
||||||
);
|
);
|
||||||
|
|
@ -212,8 +215,8 @@ class StartLearnPracticeScreen extends ViewModelWidget<LearnPracticeViewModel> {
|
||||||
|
|
||||||
Widget _buildReplyButtonWrapper() => Expanded(child: _buildReplyButton());
|
Widget _buildReplyButtonWrapper() => Expanded(child: _buildReplyButton());
|
||||||
|
|
||||||
Widget _buildReplyButton() => const CustomColumnButton(
|
Widget _buildReplyButton() => CustomColumnButton(
|
||||||
icon: Icons.replay, label: 'Reply', color: kcLightGrey);
|
icon: Icons.replay, label:LocaleKeys.reply.tr() , color: kcLightGrey);
|
||||||
|
|
||||||
Widget _buildMicButtonWrapper(LearnPracticeViewModel viewModel) =>
|
Widget _buildMicButtonWrapper(LearnPracticeViewModel viewModel) =>
|
||||||
Expanded(child: _buildMicButton(viewModel));
|
Expanded(child: _buildMicButton(viewModel));
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,9 @@
|
||||||
|
import 'package:easy_localization/easy_localization.dart';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:stacked/stacked.dart';
|
import 'package:stacked/stacked.dart';
|
||||||
import 'package:yimaru_app/ui/common/app_colors.dart';
|
import 'package:yimaru_app/ui/common/app_colors.dart';
|
||||||
import 'package:yimaru_app/ui/common/helper_functions.dart';
|
import 'package:yimaru_app/ui/common/helper_functions.dart';
|
||||||
|
import 'package:yimaru_app/ui/common/translations/locale_keys.g.dart';
|
||||||
import 'package:yimaru_app/ui/common/ui_helpers.dart';
|
import 'package:yimaru_app/ui/common/ui_helpers.dart';
|
||||||
import 'package:yimaru_app/ui/widgets/custom_elevated_button.dart';
|
import 'package:yimaru_app/ui/widgets/custom_elevated_button.dart';
|
||||||
import 'package:yimaru_app/ui/views/onboarding/onboarding_viewmodel.dart';
|
import 'package:yimaru_app/ui/views/onboarding/onboarding_viewmodel.dart';
|
||||||
|
|
@ -92,18 +94,14 @@ class FullNameFormScreen extends ViewModelWidget<OnboardingViewModel> {
|
||||||
onLanguage: () async => await viewModel.navigateToLanguage(),
|
onLanguage: () async => await viewModel.navigateToLanguage(),
|
||||||
);
|
);
|
||||||
|
|
||||||
Widget _buildTitle() => const Text(
|
Widget _buildTitle() => Text(
|
||||||
'What should we call you? 😊',
|
'${LocaleKeys.what_should_we_call_you.tr()} 😊',
|
||||||
style: TextStyle(
|
style:style25DG600,
|
||||||
fontSize: 25,
|
|
||||||
color: kcDarkGrey,
|
|
||||||
fontWeight: FontWeight.w600,
|
|
||||||
),
|
|
||||||
);
|
);
|
||||||
|
|
||||||
Widget _buildSubtitle() => const Text(
|
Widget _buildSubtitle() => Text(
|
||||||
'We’ll use your name to personalize your learning journey.',
|
LocaleKeys.use_for_personalization.tr(),
|
||||||
style: TextStyle(color: kcMediumGrey),
|
style:style14MG400,
|
||||||
);
|
);
|
||||||
|
|
||||||
Widget _buildFullNameFormField(OnboardingViewModel viewModel) =>
|
Widget _buildFullNameFormField(OnboardingViewModel viewModel) =>
|
||||||
|
|
@ -111,8 +109,8 @@ class FullNameFormScreen extends ViewModelWidget<OnboardingViewModel> {
|
||||||
controller: fullNameController,
|
controller: fullNameController,
|
||||||
onTap: viewModel.setFullNameFocus,
|
onTap: viewModel.setFullNameFocus,
|
||||||
decoration: inputDecoration(
|
decoration: inputDecoration(
|
||||||
hint: 'Enter Your Name',
|
|
||||||
focus: viewModel.focusFullName,
|
focus: viewModel.focusFullName,
|
||||||
|
hint: LocaleKeys.enter_full_name.tr(),
|
||||||
filled: fullNameController.text.isNotEmpty),
|
filled: fullNameController.text.isNotEmpty),
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
@ -134,9 +132,9 @@ class FullNameFormScreen extends ViewModelWidget<OnboardingViewModel> {
|
||||||
Widget _buildContinueButton(OnboardingViewModel viewModel) =>
|
Widget _buildContinueButton(OnboardingViewModel viewModel) =>
|
||||||
CustomElevatedButton(
|
CustomElevatedButton(
|
||||||
height: 55,
|
height: 55,
|
||||||
text: 'Continue',
|
|
||||||
borderRadius: 12,
|
borderRadius: 12,
|
||||||
foregroundColor: kcWhite,
|
foregroundColor: kcWhite,
|
||||||
|
text: LocaleKeys.cont.tr(),
|
||||||
backgroundColor: fullNameController.text.isNotEmpty &&
|
backgroundColor: fullNameController.text.isNotEmpty &&
|
||||||
!viewModel.hasFullNameValidationMessage
|
!viewModel.hasFullNameValidationMessage
|
||||||
? kcPrimaryColor
|
? kcPrimaryColor
|
||||||
|
|
|
||||||
|
|
@ -158,7 +158,7 @@ class ProfileView extends StackedView<ProfileViewModel> {
|
||||||
|
|
||||||
List<Widget> _buildSettingsChildren(ProfileViewModel viewModel) => [
|
List<Widget> _buildSettingsChildren(ProfileViewModel viewModel) => [
|
||||||
// _buildDownloadsCard(viewModel),
|
// _buildDownloadsCard(viewModel),
|
||||||
_buildProgressCard(viewModel),
|
// _buildProgressCard(viewModel),
|
||||||
_buildAccountCard(viewModel),
|
_buildAccountCard(viewModel),
|
||||||
_buildSupportCard(viewModel)
|
_buildSupportCard(viewModel)
|
||||||
];
|
];
|
||||||
|
|
@ -174,7 +174,7 @@ class ProfileView extends StackedView<ProfileViewModel> {
|
||||||
icon: Icons.stacked_bar_chart,
|
icon: Icons.stacked_bar_chart,
|
||||||
title: LocaleKeys.my_progress.tr(),
|
title: LocaleKeys.my_progress.tr(),
|
||||||
subtitle: LocaleKeys.track_your_achievement.tr(),
|
subtitle: LocaleKeys.track_your_achievement.tr(),
|
||||||
// onTap: () async => await viewModel.navigateToProgress(),
|
onTap: () async => await viewModel.navigateToProgress(),
|
||||||
);
|
);
|
||||||
|
|
||||||
Widget _buildAccountCard(ProfileViewModel viewModel) => ProfileCard(
|
Widget _buildAccountCard(ProfileViewModel viewModel) => ProfileCard(
|
||||||
|
|
|
||||||
|
|
@ -1,8 +1,10 @@
|
||||||
|
import 'package:easy_localization/easy_localization.dart';
|
||||||
import 'package:stacked/stacked.dart';
|
import 'package:stacked/stacked.dart';
|
||||||
import 'package:stacked_services/stacked_services.dart';
|
import 'package:stacked_services/stacked_services.dart';
|
||||||
import 'package:yimaru_app/app/app.router.dart';
|
import 'package:yimaru_app/app/app.router.dart';
|
||||||
import 'package:yimaru_app/services/image_picker_service.dart';
|
import 'package:yimaru_app/services/image_picker_service.dart';
|
||||||
import 'package:yimaru_app/ui/common/enmus.dart';
|
import 'package:yimaru_app/ui/common/enmus.dart';
|
||||||
|
import 'package:yimaru_app/ui/common/translations/locale_keys.g.dart';
|
||||||
|
|
||||||
import '../../../app/app.locator.dart';
|
import '../../../app/app.locator.dart';
|
||||||
import '../../../models/user.dart';
|
import '../../../models/user.dart';
|
||||||
|
|
@ -64,13 +66,13 @@ class ProfileViewModel extends ReactiveViewModel {
|
||||||
// Dialog
|
// Dialog
|
||||||
Future<bool?> showAbortDialog() async {
|
Future<bool?> showAbortDialog() async {
|
||||||
DialogResponse? response = await _dialogService.showDialog(
|
DialogResponse? response = await _dialogService.showDialog(
|
||||||
title: 'Logout',
|
|
||||||
cancelTitle: 'No',
|
|
||||||
buttonTitle: 'Yes',
|
|
||||||
barrierDismissible: true,
|
barrierDismissible: true,
|
||||||
cancelTitleColor: kcDarkGrey,
|
cancelTitleColor: kcDarkGrey,
|
||||||
buttonTitleColor: kcPrimaryColor,
|
buttonTitleColor: kcPrimaryColor,
|
||||||
description: 'Are you sure you want to quit?',
|
title: LocaleKeys.logout.tr(),
|
||||||
|
cancelTitle: LocaleKeys.no.tr(),
|
||||||
|
buttonTitle: LocaleKeys.yes.tr(),
|
||||||
|
description: LocaleKeys.want_to_quit.tr(),
|
||||||
);
|
);
|
||||||
return response?.confirmed;
|
return response?.confirmed;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,6 @@
|
||||||
import 'package:easy_localization/easy_localization.dart';
|
import 'package:easy_localization/easy_localization.dart';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:flutter/services.dart';
|
import 'package:flutter/services.dart';
|
||||||
import 'package:intl/intl.dart';
|
|
||||||
import 'package:stacked/stacked.dart';
|
import 'package:stacked/stacked.dart';
|
||||||
import 'package:stacked/stacked_annotations.dart';
|
import 'package:stacked/stacked_annotations.dart';
|
||||||
import 'package:yimaru_app/ui/common/translations/locale_keys.g.dart';
|
import 'package:yimaru_app/ui/common/translations/locale_keys.g.dart';
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,8 @@
|
||||||
|
import 'package:easy_localization/easy_localization.dart';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:stacked/stacked.dart';
|
import 'package:stacked/stacked.dart';
|
||||||
import 'package:yimaru_app/ui/common/app_constants.dart';
|
import 'package:yimaru_app/ui/common/app_constants.dart';
|
||||||
|
import 'package:yimaru_app/ui/common/translations/locale_keys.g.dart';
|
||||||
import 'package:yimaru_app/ui/widgets/circular_icon.dart';
|
import 'package:yimaru_app/ui/widgets/circular_icon.dart';
|
||||||
|
|
||||||
import '../../common/app_colors.dart';
|
import '../../common/app_colors.dart';
|
||||||
|
|
@ -52,7 +54,7 @@ class TelegramSupportView extends StackedView<TelegramSupportViewModel> {
|
||||||
Widget _buildAppbar(TelegramSupportViewModel viewModel) => SmallAppBar(
|
Widget _buildAppbar(TelegramSupportViewModel viewModel) => SmallAppBar(
|
||||||
onPop: viewModel.pop,
|
onPop: viewModel.pop,
|
||||||
showBackButton: true,
|
showBackButton: true,
|
||||||
title: 'Telegram Support',
|
title: LocaleKeys.telegram_support.tr(),
|
||||||
);
|
);
|
||||||
|
|
||||||
Widget _buildExpandedColumn(TelegramSupportViewModel viewModel) =>
|
Widget _buildExpandedColumn(TelegramSupportViewModel viewModel) =>
|
||||||
|
|
@ -93,13 +95,13 @@ class TelegramSupportView extends StackedView<TelegramSupportViewModel> {
|
||||||
const CircularIcon(icon: Icons.telegram, size: 50, color: kcSkyBlue);
|
const CircularIcon(icon: Icons.telegram, size: 50, color: kcSkyBlue);
|
||||||
|
|
||||||
Widget _buildTitle() => Text(
|
Widget _buildTitle() => Text(
|
||||||
'Join Yimaru Academy on Telegram',
|
LocaleKeys.join_telegram.tr(),
|
||||||
style: style25DG600,
|
style: style25DG600,
|
||||||
textAlign: TextAlign.center,
|
textAlign: TextAlign.center,
|
||||||
);
|
);
|
||||||
|
|
||||||
Widget _buildSubtitle() => Text(
|
Widget _buildSubtitle() => Text(
|
||||||
'Connect with our support team instantly on Telegram for quick assistance and community updates',
|
LocaleKeys.connect_with_support_team.tr(),
|
||||||
style: style14MG400,
|
style: style14MG400,
|
||||||
textAlign: TextAlign.center,
|
textAlign: TextAlign.center,
|
||||||
);
|
);
|
||||||
|
|
@ -123,17 +125,17 @@ class TelegramSupportView extends StackedView<TelegramSupportViewModel> {
|
||||||
CustomElevatedButton(
|
CustomElevatedButton(
|
||||||
height: 55,
|
height: 55,
|
||||||
borderRadius: 12,
|
borderRadius: 12,
|
||||||
text: 'Open in Telegram',
|
|
||||||
foregroundColor: kcWhite,
|
foregroundColor: kcWhite,
|
||||||
leadingIcon: Icons.telegram,
|
leadingIcon: Icons.telegram,
|
||||||
backgroundColor: kcPrimaryColor,
|
backgroundColor: kcPrimaryColor,
|
||||||
|
text: LocaleKeys.open_in_telegram.tr(),
|
||||||
onTap: () async => await viewModel.launchTelegram(),
|
onTap: () async => await viewModel.launchTelegram(),
|
||||||
);
|
);
|
||||||
|
|
||||||
Widget _buildOptionTextDivider() => const OptionTextDivider();
|
Widget _buildOptionTextDivider() => const OptionTextDivider();
|
||||||
|
|
||||||
Widget _buildSearchText() => Text.rich(
|
Widget _buildSearchText() => Text.rich(
|
||||||
TextSpan(text: 'Search for', style: style14DG500, children: [
|
TextSpan(text: LocaleKeys.search_for.tr(), style: style14DG500, children: [
|
||||||
TextSpan(
|
TextSpan(
|
||||||
style: style14P600,
|
style: style14P600,
|
||||||
text: ' $kTelegramSupport',
|
text: ' $kTelegramSupport',
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,6 @@
|
||||||
|
import 'package:easy_localization/easy_localization.dart';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
|
import 'package:yimaru_app/ui/common/translations/locale_keys.g.dart';
|
||||||
import 'package:yimaru_app/ui/widgets/speaking_partner_image.dart';
|
import 'package:yimaru_app/ui/widgets/speaking_partner_image.dart';
|
||||||
|
|
||||||
import '../common/app_colors.dart';
|
import '../common/app_colors.dart';
|
||||||
|
|
@ -51,8 +53,11 @@ class CancelLearnPracticeSheet extends StatelessWidget {
|
||||||
);
|
);
|
||||||
|
|
||||||
Widget _buildMessage() => Text.rich(
|
Widget _buildMessage() => Text.rich(
|
||||||
TextSpan(text: 'You’re almost there,', style: style18DG700, children: [
|
TextSpan(
|
||||||
TextSpan(
|
text: '${LocaleKeys.almost_there.tr()},',
|
||||||
|
style: style18DG700,
|
||||||
|
children: [
|
||||||
|
TextSpan(
|
||||||
text: ' $user',
|
text: ' $user',
|
||||||
style: style18P600,
|
style: style18P600,
|
||||||
)
|
)
|
||||||
|
|
@ -60,7 +65,7 @@ class CancelLearnPracticeSheet extends StatelessWidget {
|
||||||
);
|
);
|
||||||
|
|
||||||
Widget _buildSubtitle() => Text(
|
Widget _buildSubtitle() => Text(
|
||||||
'Finish this session to see your progress.',
|
LocaleKeys.finish_session.tr(),
|
||||||
style: style14DG400,
|
style: style14DG400,
|
||||||
textAlign: TextAlign.center,
|
textAlign: TextAlign.center,
|
||||||
);
|
);
|
||||||
|
|
@ -70,17 +75,17 @@ class CancelLearnPracticeSheet extends StatelessWidget {
|
||||||
onTap: onContinue,
|
onTap: onContinue,
|
||||||
borderRadius: 12,
|
borderRadius: 12,
|
||||||
foregroundColor: kcWhite,
|
foregroundColor: kcWhite,
|
||||||
text: 'Continue Practice',
|
|
||||||
backgroundColor: kcPrimaryColor,
|
backgroundColor: kcPrimaryColor,
|
||||||
|
text: LocaleKeys.continue_practice.tr(),
|
||||||
);
|
);
|
||||||
|
|
||||||
Widget _buildEndButton() => CustomElevatedButton(
|
Widget _buildEndButton() => CustomElevatedButton(
|
||||||
height: 55,
|
height: 55,
|
||||||
onTap: onCancel,
|
onTap: onCancel,
|
||||||
borderRadius: 12,
|
borderRadius: 12,
|
||||||
text: 'End Session',
|
|
||||||
backgroundColor: kcWhite,
|
backgroundColor: kcWhite,
|
||||||
borderColor: kcPrimaryColor,
|
borderColor: kcPrimaryColor,
|
||||||
foregroundColor: kcPrimaryColor,
|
foregroundColor: kcPrimaryColor,
|
||||||
|
text: LocaleKeys.end_session.tr(),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,7 @@
|
||||||
|
import 'package:easy_localization/easy_localization.dart';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:stacked/stacked.dart';
|
import 'package:stacked/stacked.dart';
|
||||||
|
import 'package:yimaru_app/ui/common/translations/locale_keys.g.dart';
|
||||||
import 'package:yimaru_app/ui/widgets/progress_status.dart';
|
import 'package:yimaru_app/ui/widgets/progress_status.dart';
|
||||||
|
|
||||||
import '../../models/learn_course.dart';
|
import '../../models/learn_course.dart';
|
||||||
|
|
@ -107,9 +109,9 @@ class LearnCourseTile extends ViewModelWidget<LearnCourseViewModel> {
|
||||||
? _buildProgressStatus()
|
? _buildProgressStatus()
|
||||||
: Container();
|
: Container();
|
||||||
|
|
||||||
Widget _buildProgressStatus() => const ProgressStatus(
|
Widget _buildProgressStatus() => ProgressStatus(
|
||||||
color: kcPrimaryColor,
|
color: kcPrimaryColor,
|
||||||
status: 'Current Level',
|
status: LocaleKeys.current_level.tr(),
|
||||||
);
|
);
|
||||||
|
|
||||||
Widget _buildContent() => Text(
|
Widget _buildContent() => Text(
|
||||||
|
|
@ -143,9 +145,9 @@ class LearnCourseTile extends ViewModelWidget<LearnCourseViewModel> {
|
||||||
height: 15,
|
height: 15,
|
||||||
borderRadius: 12,
|
borderRadius: 12,
|
||||||
onTap: onViewTap,
|
onTap: onViewTap,
|
||||||
text: 'View Course',
|
|
||||||
foregroundColor: kcWhite,
|
foregroundColor: kcWhite,
|
||||||
backgroundColor: kcPrimaryColor,
|
backgroundColor: kcPrimaryColor,
|
||||||
|
text:LocaleKeys.view_course.tr(),
|
||||||
);
|
);
|
||||||
|
|
||||||
Widget _buildPracticeButtonWrapper(LearnCourseViewModel viewModel) =>
|
Widget _buildPracticeButtonWrapper(LearnCourseViewModel viewModel) =>
|
||||||
|
|
@ -158,9 +160,9 @@ class LearnCourseTile extends ViewModelWidget<LearnCourseViewModel> {
|
||||||
height: 15,
|
height: 15,
|
||||||
borderRadius: 12,
|
borderRadius: 12,
|
||||||
onTap: onPracticeTap,
|
onTap: onPracticeTap,
|
||||||
text: 'Take Practice',
|
|
||||||
backgroundColor: kcWhite,
|
backgroundColor: kcWhite,
|
||||||
borderColor: kcPrimaryColor,
|
borderColor: kcPrimaryColor,
|
||||||
foregroundColor: kcPrimaryColor,
|
foregroundColor: kcPrimaryColor,
|
||||||
|
text:LocaleKeys.take_practice.tr() ,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,8 @@
|
||||||
|
import 'package:easy_localization/easy_localization.dart';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:stacked/stacked.dart';
|
import 'package:stacked/stacked.dart';
|
||||||
import 'package:yimaru_app/models/learn_lesson.dart';
|
import 'package:yimaru_app/models/learn_lesson.dart';
|
||||||
|
import 'package:yimaru_app/ui/common/translations/locale_keys.g.dart';
|
||||||
import 'package:yimaru_app/ui/views/learn_lesson/learn_lesson_viewmodel.dart';
|
import 'package:yimaru_app/ui/views/learn_lesson/learn_lesson_viewmodel.dart';
|
||||||
import 'package:yimaru_app/ui/widgets/mini_thumbnail.dart';
|
import 'package:yimaru_app/ui/widgets/mini_thumbnail.dart';
|
||||||
|
|
||||||
|
|
@ -128,7 +130,7 @@ class LearnLessonTile extends ViewModelWidget<LearnLessonViewModel> {
|
||||||
);
|
);
|
||||||
|
|
||||||
Widget _buildProgressText() => Text(
|
Widget _buildProgressText() => Text(
|
||||||
(lesson.access?.isCompleted ?? false) ? 'Completed' : 'In Progress',
|
(lesson.access?.isCompleted ?? false) ?LocaleKeys.completed.tr() : LocaleKeys.in_progress.tr() ,
|
||||||
style: style14P600,
|
style: style14P600,
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
@ -158,13 +160,13 @@ class LearnLessonTile extends ViewModelWidget<LearnLessonViewModel> {
|
||||||
Widget _buildPracticeButton(LearnLessonViewModel viewModel) =>
|
Widget _buildPracticeButton(LearnLessonViewModel viewModel) =>
|
||||||
CustomElevatedButton(
|
CustomElevatedButton(
|
||||||
height: 15,
|
height: 15,
|
||||||
text: 'Practice',
|
|
||||||
borderRadius: 12,
|
borderRadius: 12,
|
||||||
onTap: onPracticeTap,
|
onTap: onPracticeTap,
|
||||||
trailingIcon: Icons.mic,
|
trailingIcon: Icons.mic,
|
||||||
width: double.maxFinite,
|
width: double.maxFinite,
|
||||||
backgroundColor: kcWhite,
|
backgroundColor: kcWhite,
|
||||||
borderColor: kcPrimaryColor,
|
borderColor: kcPrimaryColor,
|
||||||
|
text:LocaleKeys.practice.tr() ,
|
||||||
foregroundColor: kcPrimaryColor,
|
foregroundColor: kcPrimaryColor,
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
@ -176,11 +178,11 @@ class LearnLessonTile extends ViewModelWidget<LearnLessonViewModel> {
|
||||||
Widget _buildLessonButton(LearnLessonViewModel viewModel) =>
|
Widget _buildLessonButton(LearnLessonViewModel viewModel) =>
|
||||||
CustomElevatedButton(
|
CustomElevatedButton(
|
||||||
height: 15,
|
height: 15,
|
||||||
text: 'Start',
|
|
||||||
borderRadius: 12,
|
borderRadius: 12,
|
||||||
onTap: onLessonTap,
|
onTap: onLessonTap,
|
||||||
width: double.maxFinite,
|
width: double.maxFinite,
|
||||||
foregroundColor: kcWhite,
|
foregroundColor: kcWhite,
|
||||||
|
text:LocaleKeys.start.tr() ,
|
||||||
trailingIcon: Icons.play_arrow,
|
trailingIcon: Icons.play_arrow,
|
||||||
backgroundColor: kcPrimaryColor,
|
backgroundColor: kcPrimaryColor,
|
||||||
);
|
);
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,8 @@
|
||||||
|
import 'package:easy_localization/easy_localization.dart';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:stacked/stacked.dart';
|
import 'package:stacked/stacked.dart';
|
||||||
import 'package:yimaru_app/models/learn_module.dart';
|
import 'package:yimaru_app/models/learn_module.dart';
|
||||||
|
import 'package:yimaru_app/ui/common/translations/locale_keys.g.dart';
|
||||||
import 'package:yimaru_app/ui/views/learn_module/learn_module_viewmodel.dart';
|
import 'package:yimaru_app/ui/views/learn_module/learn_module_viewmodel.dart';
|
||||||
import 'package:yimaru_app/ui/widgets/custom_container_shader.dart';
|
import 'package:yimaru_app/ui/widgets/custom_container_shader.dart';
|
||||||
import 'package:yimaru_app/ui/widgets/custom_linear_progress_indicator.dart';
|
import 'package:yimaru_app/ui/widgets/custom_linear_progress_indicator.dart';
|
||||||
|
|
@ -191,9 +193,9 @@ class LearnModuleTile extends ViewModelWidget<LearnModuleViewModel> {
|
||||||
height: 15,
|
height: 15,
|
||||||
borderRadius: 12,
|
borderRadius: 12,
|
||||||
onTap: onModuleTap,
|
onTap: onModuleTap,
|
||||||
text: 'View Module',
|
|
||||||
foregroundColor: kcWhite,
|
foregroundColor: kcWhite,
|
||||||
backgroundColor: kcPrimaryColor,
|
backgroundColor: kcPrimaryColor,
|
||||||
|
text: LocaleKeys.view_module.tr(),
|
||||||
);
|
);
|
||||||
|
|
||||||
Widget _buildPracticeButtonWrapper(LearnModuleViewModel viewModel) =>
|
Widget _buildPracticeButtonWrapper(LearnModuleViewModel viewModel) =>
|
||||||
|
|
@ -206,10 +208,10 @@ class LearnModuleTile extends ViewModelWidget<LearnModuleViewModel> {
|
||||||
height: 15,
|
height: 15,
|
||||||
borderRadius: 12,
|
borderRadius: 12,
|
||||||
onTap: onPracticeTap,
|
onTap: onPracticeTap,
|
||||||
text: 'Take Practices',
|
|
||||||
backgroundColor: kcWhite,
|
backgroundColor: kcWhite,
|
||||||
borderColor: kcPrimaryColor,
|
borderColor: kcPrimaryColor,
|
||||||
foregroundColor: kcPrimaryColor,
|
foregroundColor: kcPrimaryColor,
|
||||||
|
text:LocaleKeys.take_practice.tr(),
|
||||||
|
|
||||||
// onTap: () async => await viewModel.navigateToLearnPractice(practices),
|
// onTap: () async => await viewModel.navigateToLearnPractice(practices),
|
||||||
);
|
);
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,8 @@
|
||||||
|
import 'package:easy_localization/easy_localization.dart';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:stacked/stacked.dart';
|
import 'package:stacked/stacked.dart';
|
||||||
import 'package:yimaru_app/ui/common/enmus.dart';
|
import 'package:yimaru_app/ui/common/enmus.dart';
|
||||||
|
import 'package:yimaru_app/ui/common/translations/locale_keys.g.dart';
|
||||||
import 'package:yimaru_app/ui/common/ui_helpers.dart';
|
import 'package:yimaru_app/ui/common/ui_helpers.dart';
|
||||||
import 'package:yimaru_app/ui/views/learn_practice/learn_practice_viewmodel.dart';
|
import 'package:yimaru_app/ui/views/learn_practice/learn_practice_viewmodel.dart';
|
||||||
import 'package:yimaru_app/ui/widgets/learn_practice_answer_card.dart';
|
import 'package:yimaru_app/ui/widgets/learn_practice_answer_card.dart';
|
||||||
|
|
@ -51,7 +53,7 @@ class LearnPracticeResultCard extends ViewModelWidget<LearnPracticeViewModel> {
|
||||||
Widget _buildSampleResponse() => LearnPracticeAnswerCard(
|
Widget _buildSampleResponse() => LearnPracticeAnswerCard(
|
||||||
answer: answer,
|
answer: answer,
|
||||||
voice: Voice.sample,
|
voice: Voice.sample,
|
||||||
title: 'Sample Answer',
|
title:LocaleKeys.sample_answer.tr() ,
|
||||||
);
|
);
|
||||||
|
|
||||||
Widget _buildActualResponseWrapper() =>
|
Widget _buildActualResponseWrapper() =>
|
||||||
|
|
@ -59,7 +61,8 @@ class LearnPracticeResultCard extends ViewModelWidget<LearnPracticeViewModel> {
|
||||||
|
|
||||||
Widget _buildActualResponse() => LearnPracticeAnswerCard(
|
Widget _buildActualResponse() => LearnPracticeAnswerCard(
|
||||||
answer: answer,
|
answer: answer,
|
||||||
title: 'Your Answer',
|
|
||||||
voice: Voice.recorded,
|
voice: Voice.recorded,
|
||||||
);
|
title: LocaleKeys.your_answer.tr(),
|
||||||
|
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,7 @@
|
||||||
|
import 'package:easy_localization/easy_localization.dart';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:stacked/stacked.dart';
|
import 'package:stacked/stacked.dart';
|
||||||
|
import 'package:yimaru_app/ui/common/translations/locale_keys.g.dart';
|
||||||
import 'package:yimaru_app/ui/common/ui_helpers.dart';
|
import 'package:yimaru_app/ui/common/ui_helpers.dart';
|
||||||
import 'package:yimaru_app/ui/views/learn_practice/learn_practice_viewmodel.dart';
|
import 'package:yimaru_app/ui/views/learn_practice/learn_practice_viewmodel.dart';
|
||||||
import 'package:yimaru_app/ui/widgets/learn_practice_result_card.dart';
|
import 'package:yimaru_app/ui/widgets/learn_practice_result_card.dart';
|
||||||
|
|
@ -33,7 +35,7 @@ class LearnPracticeResultsWrapper
|
||||||
[_buildTitle(), verticalSpaceSmall, _buildResults(viewModel)];
|
[_buildTitle(), verticalSpaceSmall, _buildResults(viewModel)];
|
||||||
|
|
||||||
Widget _buildTitle() => Text(
|
Widget _buildTitle() => Text(
|
||||||
'Conversation Review',
|
LocaleKeys.conversation_review.tr(),
|
||||||
style: style16DG600,
|
style: style16DG600,
|
||||||
textAlign: TextAlign.center,
|
textAlign: TextAlign.center,
|
||||||
);
|
);
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,8 @@
|
||||||
|
import 'package:easy_localization/easy_localization.dart';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:stacked/stacked.dart';
|
import 'package:stacked/stacked.dart';
|
||||||
import 'package:yimaru_app/ui/common/app_colors.dart';
|
import 'package:yimaru_app/ui/common/app_colors.dart';
|
||||||
|
import 'package:yimaru_app/ui/common/translations/locale_keys.g.dart';
|
||||||
import 'package:yimaru_app/ui/common/ui_helpers.dart';
|
import 'package:yimaru_app/ui/common/ui_helpers.dart';
|
||||||
import 'package:yimaru_app/ui/views/learn_practice/learn_practice_viewmodel.dart';
|
import 'package:yimaru_app/ui/views/learn_practice/learn_practice_viewmodel.dart';
|
||||||
|
|
||||||
|
|
@ -39,7 +41,7 @@ class LearnPracticeTipSection extends ViewModelWidget<LearnPracticeViewModel> {
|
||||||
);
|
);
|
||||||
|
|
||||||
Widget _buildTitle() => Text(
|
Widget _buildTitle() => Text(
|
||||||
'Quick Tip',
|
LocaleKeys.quick_tip.tr(),
|
||||||
style: style16B600,
|
style: style16B600,
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -24,7 +24,7 @@ class LearnProgramTile extends ViewModelWidget<LearnProgramViewModel> {
|
||||||
|
|
||||||
Widget _buildExpansionTileCardWrapper(LearnProgramViewModel viewModel) =>
|
Widget _buildExpansionTileCardWrapper(LearnProgramViewModel viewModel) =>
|
||||||
GestureDetector(
|
GestureDetector(
|
||||||
onTap: !(program.access?.isAccessible ?? false) ? onLockTap : null,
|
// onTap: !(program.access?.isAccessible ?? false) ? onLockTap : null,
|
||||||
child: _buildExpansionTileCard(viewModel),
|
child: _buildExpansionTileCard(viewModel),
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,6 @@
|
||||||
|
import 'package:easy_localization/easy_localization.dart';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
|
import 'package:yimaru_app/ui/common/translations/locale_keys.g.dart';
|
||||||
|
|
||||||
import '../common/app_colors.dart';
|
import '../common/app_colors.dart';
|
||||||
import '../common/ui_helpers.dart';
|
import '../common/ui_helpers.dart';
|
||||||
|
|
@ -44,7 +46,7 @@ class ModuleProgress extends StatelessWidget {
|
||||||
[_buildProgressInfo(), _buildProgress()];
|
[_buildProgressInfo(), _buildProgress()];
|
||||||
|
|
||||||
Widget _buildProgressInfo() => Text(
|
Widget _buildProgressInfo() => Text(
|
||||||
'$progress% Progress',
|
'$progress% ${LocaleKeys.progress.tr()}',
|
||||||
style: style16DG400,
|
style: style16DG400,
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,6 @@
|
||||||
|
import 'package:easy_localization/easy_localization.dart';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
|
import 'package:yimaru_app/ui/common/translations/locale_keys.g.dart';
|
||||||
import 'package:yimaru_app/ui/common/ui_helpers.dart';
|
import 'package:yimaru_app/ui/common/ui_helpers.dart';
|
||||||
|
|
||||||
import '../common/app_colors.dart';
|
import '../common/app_colors.dart';
|
||||||
|
|
@ -31,7 +33,7 @@ class MotivationCard extends StatelessWidget {
|
||||||
|
|
||||||
Widget _buildText() => Expanded(
|
Widget _buildText() => Expanded(
|
||||||
child: Text(
|
child: Text(
|
||||||
'Let’s keep going — you’re more than halfway there!',
|
LocaleKeys.keep_going.tr(),
|
||||||
maxLines: 2,
|
maxLines: 2,
|
||||||
style: style14DG400,
|
style: style14DG400,
|
||||||
),
|
),
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,7 @@
|
||||||
|
import 'package:easy_localization/easy_localization.dart';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:yimaru_app/ui/common/app_colors.dart';
|
import 'package:yimaru_app/ui/common/app_colors.dart';
|
||||||
|
import 'package:yimaru_app/ui/common/translations/locale_keys.g.dart';
|
||||||
import 'package:yimaru_app/ui/common/ui_helpers.dart';
|
import 'package:yimaru_app/ui/common/ui_helpers.dart';
|
||||||
import 'package:yimaru_app/ui/widgets/custom_linear_progress_indicator.dart';
|
import 'package:yimaru_app/ui/widgets/custom_linear_progress_indicator.dart';
|
||||||
|
|
||||||
|
|
@ -48,7 +50,7 @@ class OverallProgress extends StatelessWidget {
|
||||||
[_buildProgressInfo(), _buildProgress()];
|
[_buildProgressInfo(), _buildProgress()];
|
||||||
|
|
||||||
Widget _buildProgressInfo() => Text(
|
Widget _buildProgressInfo() => Text(
|
||||||
'Overall Progress',
|
LocaleKeys.overall_progress.tr(),
|
||||||
style: style16DG600,
|
style: style16DG600,
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
@ -64,7 +66,7 @@ class OverallProgress extends StatelessWidget {
|
||||||
);
|
);
|
||||||
|
|
||||||
Widget _buildSubtitle() => Text(
|
Widget _buildSubtitle() => Text(
|
||||||
'Keep up the great work! You\'re doing amazing.',
|
LocaleKeys.keep_up_the_great_work.tr(),
|
||||||
style: style14DG500,
|
style: style14DG500,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
name: yimaru_app
|
name: yimaru_app
|
||||||
version: 0.1.18+20
|
version: 0.1.19+21
|
||||||
publish_to: 'none'
|
publish_to: 'none'
|
||||||
description: A new Flutter project.
|
description: A new Flutter project.
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user