Compare commits
3 Commits
f7c7ed0221
...
456a3712a5
| Author | SHA1 | Date | |
|---|---|---|---|
| 456a3712a5 | |||
| a31e18748c | |||
| 26b7ee9e53 |
|
|
@ -151,7 +151,9 @@
|
||||||
"phone_must_start_with": "የስልክ ቁጥር በ251 መጀመር አለበት",
|
"phone_must_start_with": "የስልክ ቁጥር በ251 መጀመር አለበት",
|
||||||
"phone_must_be": "የስልክ ቁጥር 12 አሃዞች መሆን አለበት",
|
"phone_must_be": "የስልክ ቁጥር 12 አሃዞች መሆን አለበት",
|
||||||
"what_should_we_call_you": "ምን ብለን እንጠራህ?",
|
"what_should_we_call_you": "ምን ብለን እንጠራህ?",
|
||||||
"use_for_personalization": "በመማር ጉዞህ ውስጥ ለግል ለማድረግ ስምህን እንጠቀማለን።"
|
"name_for_personalization": "በመማር ጉዞህ ውስጥ ለግል ለማድረግ ስምህን እንጠቀማለን።",
|
||||||
|
"choose_your_gender": "ጾታህን ምረጥ",
|
||||||
|
"gender_for_personalization": "በጾታህ መሰረት የመማር ተሞክሮህን እናበጅለታለን።"
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -151,6 +151,9 @@
|
||||||
"phone_must_start_with": "Phone number must start with 251",
|
"phone_must_start_with": "Phone number must start with 251",
|
||||||
"phone_must_be": "Phone number must be 12 digits",
|
"phone_must_be": "Phone number must be 12 digits",
|
||||||
"what_should_we_call_you": "What should we call you?",
|
"what_should_we_call_you": "What should we call you?",
|
||||||
"use_for_personalization": "We’ll use your name to personalize your learning journey."
|
"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."
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -167,7 +167,9 @@ class CodegenLoader extends AssetLoader{
|
||||||
"phone_must_start_with": "የስልክ ቁጥር በ251 መጀመር አለበት",
|
"phone_must_start_with": "የስልክ ቁጥር በ251 መጀመር አለበት",
|
||||||
"phone_must_be": "የስልክ ቁጥር 12 አሃዞች መሆን አለበት",
|
"phone_must_be": "የስልክ ቁጥር 12 አሃዞች መሆን አለበት",
|
||||||
"what_should_we_call_you": "ምን ብለን እንጠራህ?",
|
"what_should_we_call_you": "ምን ብለን እንጠራህ?",
|
||||||
"use_for_personalization": "በመማር ጉዞህ ውስጥ ለግል ለማድረግ ስምህን እንጠቀማለን።"
|
"name_for_personalization": "በመማር ጉዞህ ውስጥ ለግል ለማድረግ ስምህን እንጠቀማለን።",
|
||||||
|
"choose_your_gender": "ጾታህን ምረጥ",
|
||||||
|
"gender_for_personalization": "በጾታህ መሰረት የመማር ተሞክሮህን እናበጅለታለን።"
|
||||||
};
|
};
|
||||||
static const Map<String,dynamic> _en = {
|
static const Map<String,dynamic> _en = {
|
||||||
"loading": "Loading",
|
"loading": "Loading",
|
||||||
|
|
@ -322,7 +324,9 @@ static const Map<String,dynamic> _en = {
|
||||||
"phone_must_start_with": "Phone number must start with 251",
|
"phone_must_start_with": "Phone number must start with 251",
|
||||||
"phone_must_be": "Phone number must be 12 digits",
|
"phone_must_be": "Phone number must be 12 digits",
|
||||||
"what_should_we_call_you": "What should we call you?",
|
"what_should_we_call_you": "What should we call you?",
|
||||||
"use_for_personalization": "We’ll use your name to personalize your learning journey."
|
"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."
|
||||||
};
|
};
|
||||||
static const Map<String, Map<String,dynamic>> mapLocales = {"am": _am, "en": _en};
|
static const Map<String, Map<String,dynamic>> mapLocales = {"am": _am, "en": _en};
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -153,6 +153,8 @@ abstract class LocaleKeys {
|
||||||
static const phone_must_start_with = 'phone_must_start_with';
|
static const phone_must_start_with = 'phone_must_start_with';
|
||||||
static const phone_must_be = 'phone_must_be';
|
static const phone_must_be = 'phone_must_be';
|
||||||
static const what_should_we_call_you = 'what_should_we_call_you';
|
static const what_should_we_call_you = 'what_should_we_call_you';
|
||||||
static const use_for_personalization = 'use_for_personalization';
|
static const name_for_personalization = 'name_for_personalization';
|
||||||
|
static const choose_your_gender = 'choose_your_gender';
|
||||||
|
static const gender_for_personalization = 'gender_for_personalization';
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -62,12 +62,19 @@ class OnboardingViewModel extends ReactiveViewModel
|
||||||
String? get selectedEducationalBackground => _selectedEducationalBackground;
|
String? get selectedEducationalBackground => _selectedEducationalBackground;
|
||||||
|
|
||||||
// Gender
|
// Gender
|
||||||
final List<String> _genders = [
|
final List<String> _gendersEn = [
|
||||||
'Male',
|
'Male',
|
||||||
'Female',
|
'Female',
|
||||||
];
|
];
|
||||||
|
|
||||||
List<String> get genders => _genders;
|
List<String> get gendersEn => _gendersEn;
|
||||||
|
|
||||||
|
final List<String> _gendersAm = [
|
||||||
|
'ወንድ',
|
||||||
|
'ሴት',
|
||||||
|
];
|
||||||
|
|
||||||
|
List<String> get gendersAm => _gendersAm;
|
||||||
|
|
||||||
String? _selectedGender;
|
String? _selectedGender;
|
||||||
|
|
||||||
|
|
@ -78,7 +85,9 @@ class OnboardingViewModel extends ReactiveViewModel
|
||||||
{
|
{
|
||||||
'Under 13': 'UNDER_13',
|
'Under 13': 'UNDER_13',
|
||||||
},
|
},
|
||||||
{'13-17': '13_17'},
|
{
|
||||||
|
'13-17': '13_17',
|
||||||
|
},
|
||||||
{
|
{
|
||||||
'18-24': '18_24',
|
'18-24': '18_24',
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -100,7 +100,7 @@ class FullNameFormScreen extends ViewModelWidget<OnboardingViewModel> {
|
||||||
);
|
);
|
||||||
|
|
||||||
Widget _buildSubtitle() => Text(
|
Widget _buildSubtitle() => Text(
|
||||||
LocaleKeys.use_for_personalization.tr(),
|
LocaleKeys.name_for_personalization.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/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_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';
|
||||||
|
|
@ -85,23 +87,25 @@ class GenderFormScreen extends ViewModelWidget<OnboardingViewModel> {
|
||||||
);
|
);
|
||||||
|
|
||||||
Widget _buildTitle() => Text(
|
Widget _buildTitle() => Text(
|
||||||
'Choose your gender?',
|
LocaleKeys.choose_your_gender.tr(),
|
||||||
style: style25DG600,
|
style: style25DG600,
|
||||||
);
|
);
|
||||||
|
|
||||||
Widget _buildSubtitle() => Text(
|
Widget _buildSubtitle() => Text(
|
||||||
'We’ll personalize your learning experience based on your gender.',
|
LocaleKeys.gender_for_personalization.tr(),
|
||||||
style: style14MG400,
|
style: style14MG400,
|
||||||
);
|
);
|
||||||
|
|
||||||
Widget _buildAgeGroups(OnboardingViewModel viewModel) => ListView.builder(
|
Widget _buildAgeGroups(OnboardingViewModel viewModel) => ListView.builder(
|
||||||
shrinkWrap: true,
|
shrinkWrap: true,
|
||||||
itemCount: viewModel.genders.length,
|
itemCount: viewModel.selectedLanguage['code'] == 'am'
|
||||||
|
? viewModel.gendersAm.length
|
||||||
|
: viewModel.gendersEn.length,
|
||||||
physics: const NeverScrollableScrollPhysics(),
|
physics: const NeverScrollableScrollPhysics(),
|
||||||
itemBuilder: (context, index) => _buildAgeGroup(
|
itemBuilder: (context, index) => _buildAgeGroup(
|
||||||
title: viewModel.genders[index],
|
title:viewModel.selectedLanguage['code'] == 'am' ? viewModel.gendersAm[index]:viewModel.gendersEn[index],
|
||||||
selected: viewModel.isSelectedGender(viewModel.genders[index]),
|
selected: viewModel.isSelectedGender(viewModel.selectedLanguage['code'] == 'am' ? viewModel.gendersAm[index]: viewModel.gendersEn[index]),
|
||||||
onTap: () => viewModel.setSelectedGender(viewModel.genders[index]),
|
onTap: () => viewModel.setSelectedGender(viewModel.selectedLanguage['code'] == 'am' ? viewModel.gendersAm[index]: viewModel.gendersEn[index]),
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
@ -123,9 +127,9 @@ class GenderFormScreen 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: viewModel.selectedGender != null
|
backgroundColor: viewModel.selectedGender != null
|
||||||
? kcPrimaryColor
|
? kcPrimaryColor
|
||||||
: kcPrimaryColor.withOpacity(0.1),
|
: kcPrimaryColor.withOpacity(0.1),
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
name: yimaru_app
|
name: yimaru_app
|
||||||
version: 0.1.19+21
|
version: 0.1.20+22
|
||||||
publish_to: 'none'
|
publish_to: 'none'
|
||||||
description: A new Flutter project.
|
description: A new Flutter project.
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user