diff --git a/assets/icons/Vector (8).svg b/assets/icons/Vector (8).svg
deleted file mode 100644
index 40fb2bf..0000000
--- a/assets/icons/Vector (8).svg
+++ /dev/null
@@ -1,3 +0,0 @@
-
diff --git a/assets/icons/ic_deliver.svg b/assets/icons/ic_deliver.svg
new file mode 100644
index 0000000..1b95eb6
--- /dev/null
+++ b/assets/icons/ic_deliver.svg
@@ -0,0 +1,3 @@
+
diff --git a/assets/icons/ic_eng.png b/assets/icons/ic_eng.png
new file mode 100644
index 0000000..8be3aa9
Binary files /dev/null and b/assets/icons/ic_eng.png differ
diff --git a/assets/icons/ic_gift.svg b/assets/icons/ic_gift.svg
new file mode 100644
index 0000000..c9ddb81
--- /dev/null
+++ b/assets/icons/ic_gift.svg
@@ -0,0 +1,3 @@
+
diff --git a/assets/icons/ic_help.svg b/assets/icons/ic_help.svg
new file mode 100644
index 0000000..e79cbce
--- /dev/null
+++ b/assets/icons/ic_help.svg
@@ -0,0 +1,3 @@
+
diff --git a/assets/icons/ic_language.svg b/assets/icons/ic_language.svg
new file mode 100644
index 0000000..4da9bb6
--- /dev/null
+++ b/assets/icons/ic_language.svg
@@ -0,0 +1,2 @@
+
+
\ No newline at end of file
diff --git a/assets/icons/ic_like.svg b/assets/icons/ic_like.svg
new file mode 100644
index 0000000..7162ed4
--- /dev/null
+++ b/assets/icons/ic_like.svg
@@ -0,0 +1,3 @@
+
diff --git a/assets/icons/ic_orders_svg.svg b/assets/icons/ic_orders_svg.svg
new file mode 100644
index 0000000..b45ffa1
--- /dev/null
+++ b/assets/icons/ic_orders_svg.svg
@@ -0,0 +1,3 @@
+
diff --git a/assets/icons/ic_promotions.svg b/assets/icons/ic_promotions.svg
new file mode 100644
index 0000000..888aa32
--- /dev/null
+++ b/assets/icons/ic_promotions.svg
@@ -0,0 +1,3 @@
+
diff --git a/assets/icons/ic_rewards.svg b/assets/icons/ic_rewards.svg
new file mode 100644
index 0000000..52c5bdc
--- /dev/null
+++ b/assets/icons/ic_rewards.svg
@@ -0,0 +1,4 @@
+
diff --git a/assets/icons/ic_rus.png b/assets/icons/ic_rus.png
new file mode 100644
index 0000000..dbc0e4f
Binary files /dev/null and b/assets/icons/ic_rus.png differ
diff --git a/assets/icons/ic_settings.svg b/assets/icons/ic_settings.svg
new file mode 100644
index 0000000..8b93fa6
--- /dev/null
+++ b/assets/icons/ic_settings.svg
@@ -0,0 +1,8 @@
+
diff --git a/assets/icons/ic_uber_pass.svg b/assets/icons/ic_uber_pass.svg
new file mode 100644
index 0000000..42f1658
--- /dev/null
+++ b/assets/icons/ic_uber_pass.svg
@@ -0,0 +1,3 @@
+
diff --git a/assets/icons/ic_uzb.png b/assets/icons/ic_uzb.png
new file mode 100644
index 0000000..0e7b5d5
Binary files /dev/null and b/assets/icons/ic_uzb.png differ
diff --git a/assets/icons/ic_wallet.svg b/assets/icons/ic_wallet.svg
new file mode 100644
index 0000000..87c5884
--- /dev/null
+++ b/assets/icons/ic_wallet.svg
@@ -0,0 +1,4 @@
+
diff --git a/assets/images/img_avatar.jpg b/assets/images/img_avatar.jpg
new file mode 100644
index 0000000..b1d25f5
Binary files /dev/null and b/assets/images/img_avatar.jpg differ
diff --git a/assets/translations/app_en.arb b/assets/translations/app_en.arb
index a69e1ed..3b21ecb 100644
--- a/assets/translations/app_en.arb
+++ b/assets/translations/app_en.arb
@@ -138,7 +138,26 @@
"asian": "Asian",
"bakery": "Bakery",
"allCategories": "All categories",
- "categoriesShort": "Food, shopping, drinks, etc."
+ "categoriesShort": "Food, shopping, drinks, etc.",
+ "yourFavourites": "Your favourites",
+ "restaurantRewards": "Restaurant Rewards",
+ "wallet": "Wallet",
+ "sendAGift": "Send a gift",
+ "businessPreferences": "Business preferences",
+ "businessSub": "Make work meals quicker and easier",
+ "help": "Help",
+ "promotions": "Promotions",
+ "uberPass": "Uber Pass",
+ "uberPassSub": "Join free for 1 month",
+ "deliverWithUber": "Deliver with Uber",
+ "settings": "Settings",
+ "home": "Home",
+ "browse": "Browse",
+ "baskets": "Baskets",
+ "account": "Account",
+ "changeLanguage": "Change language",
+ "language": "Language"
+
diff --git a/assets/translations/app_ru.arb b/assets/translations/app_ru.arb
index d15929b..f990c18 100644
--- a/assets/translations/app_ru.arb
+++ b/assets/translations/app_ru.arb
@@ -133,7 +133,26 @@
"asian": "Азиатская кухня",
"bakery": "Пекарня",
"categoriesShort": "Еда, покупки, напитки и т.д.",
- "allCategories": "Все категории"
+ "allCategories": "Все категории",
+ "yourFavourites": "Избранное",
+ "restaurantRewards": "Бонусы ресторанов",
+ "wallet": "Кошелёк",
+ "sendAGift": "Отправить подарок",
+ "businessPreferences": "Рабочие предпочтения",
+ "businessSub": "Сделайте рабочие обеды быстрее и проще",
+ "help": "Помощь",
+ "promotions": "Акции",
+ "uberPass": "Uber Pass",
+ "uberPassSub": "Присоединяйтесь бесплатно на 1 месяц",
+ "deliverWithUber": "Доставляйте с Uber",
+ "settings": "Настройки",
+ "home": "Главная",
+ "browse": "Категории",
+ "baskets": "Корзина",
+ "account": "Аккаунт",
+ "language": "Язык",
+ "changeLanguage": "Сменить язык"
+
diff --git a/assets/translations/app_uz.arb b/assets/translations/app_uz.arb
index 5d53187..edae951 100644
--- a/assets/translations/app_uz.arb
+++ b/assets/translations/app_uz.arb
@@ -133,7 +133,26 @@
"asian": "Osiyo taomlari",
"bakery": "Qandolatxona",
"categoriesShort": "Ovqat, xaridlar, ichimliklar va boshqalar.",
- "allCategories": "Barcha toifalar"
+ "allCategories": "Barcha toifalar",
+ "yourFavourites": "Sevimlilar",
+ "restaurantRewards": "Restoran bonuslari",
+ "wallet": "Hamyon",
+ "sendAGift": "Sovg‘a yuborish",
+ "businessPreferences": "Biznes sozlamalari",
+ "businessSub": "Ishdagi ovqatlarni tezroq va osonroq qiling",
+ "help": "Yordam",
+ "promotions": "Aksiyalar",
+ "uberPass": "Uber Pass",
+ "uberPassSub": "1 oy bepul ulaning",
+ "deliverWithUber": "Uber bilan yetkazib bering",
+ "settings": "Sozlamalar",
+ "home": "Bosh sahifa",
+ "browse": "Kategoriya",
+ "baskets": "Savatcha",
+ "account": "Profil",
+ "language": "Til",
+ "changeLanguage": "Tilni o'zgartirish"
+
diff --git a/lib/core/l10n/app_localizations.dart b/lib/core/l10n/app_localizations.dart
index 142ea89..da15842 100644
--- a/lib/core/l10n/app_localizations.dart
+++ b/lib/core/l10n/app_localizations.dart
@@ -651,6 +651,108 @@ abstract class AppLocalizations {
/// In en, this message translates to:
/// **'Food, shopping, drinks, etc.'**
String get categoriesShort;
+
+ /// No description provided for @yourFavourites.
+ ///
+ /// In en, this message translates to:
+ /// **'Your favourites'**
+ String get yourFavourites;
+
+ /// No description provided for @wallet.
+ ///
+ /// In en, this message translates to:
+ /// **'Wallet'**
+ String get wallet;
+
+ /// No description provided for @sendAGift.
+ ///
+ /// In en, this message translates to:
+ /// **'Send a gift'**
+ String get sendAGift;
+
+ /// No description provided for @businessPreferences.
+ ///
+ /// In en, this message translates to:
+ /// **'Business preferences'**
+ String get businessPreferences;
+
+ /// No description provided for @businessSub.
+ ///
+ /// In en, this message translates to:
+ /// **'Make work meals quicker and easier'**
+ String get businessSub;
+
+ /// No description provided for @help.
+ ///
+ /// In en, this message translates to:
+ /// **'Help'**
+ String get help;
+
+ /// No description provided for @promotions.
+ ///
+ /// In en, this message translates to:
+ /// **'Promotions'**
+ String get promotions;
+
+ /// No description provided for @uberPass.
+ ///
+ /// In en, this message translates to:
+ /// **'Uber Pass'**
+ String get uberPass;
+
+ /// No description provided for @uberPassSub.
+ ///
+ /// In en, this message translates to:
+ /// **'Join free for 1 month'**
+ String get uberPassSub;
+
+ /// No description provided for @deliverWithUber.
+ ///
+ /// In en, this message translates to:
+ /// **'Deliver with Uber'**
+ String get deliverWithUber;
+
+ /// No description provided for @settings.
+ ///
+ /// In en, this message translates to:
+ /// **'Settings'**
+ String get settings;
+
+ /// No description provided for @home.
+ ///
+ /// In en, this message translates to:
+ /// **'Home'**
+ String get home;
+
+ /// No description provided for @browse.
+ ///
+ /// In en, this message translates to:
+ /// **'Browse'**
+ String get browse;
+
+ /// No description provided for @baskets.
+ ///
+ /// In en, this message translates to:
+ /// **'Baskets'**
+ String get baskets;
+
+ /// No description provided for @account.
+ ///
+ /// In en, this message translates to:
+ /// **'Account'**
+ String get account;
+
+ /// No description provided for @changeLanguage.
+ ///
+ /// In en, this message translates to:
+ /// **'Change language'**
+ String get changeLanguage;
+
+ /// No description provided for @language.
+ ///
+ /// In en, this message translates to:
+ /// **'Language'**
+ String get language;
}
class _AppLocalizationsDelegate
diff --git a/lib/core/l10n/app_localizations_en.dart b/lib/core/l10n/app_localizations_en.dart
index 2c2a205..1d91b16 100644
--- a/lib/core/l10n/app_localizations_en.dart
+++ b/lib/core/l10n/app_localizations_en.dart
@@ -295,4 +295,55 @@ class AppLocalizationsEn extends AppLocalizations {
@override
String get categoriesShort => 'Food, shopping, drinks, etc.';
+
+ @override
+ String get yourFavourites => 'Your favourites';
+
+ @override
+ String get wallet => 'Wallet';
+
+ @override
+ String get sendAGift => 'Send a gift';
+
+ @override
+ String get businessPreferences => 'Business preferences';
+
+ @override
+ String get businessSub => 'Make work meals quicker and easier';
+
+ @override
+ String get help => 'Help';
+
+ @override
+ String get promotions => 'Promotions';
+
+ @override
+ String get uberPass => 'Uber Pass';
+
+ @override
+ String get uberPassSub => 'Join free for 1 month';
+
+ @override
+ String get deliverWithUber => 'Deliver with Uber';
+
+ @override
+ String get settings => 'Settings';
+
+ @override
+ String get home => 'Home';
+
+ @override
+ String get browse => 'Browse';
+
+ @override
+ String get baskets => 'Baskets';
+
+ @override
+ String get account => 'Account';
+
+ @override
+ String get changeLanguage => 'Change language';
+
+ @override
+ String get language => 'Language';
}
diff --git a/lib/core/l10n/app_localizations_ru.dart b/lib/core/l10n/app_localizations_ru.dart
index 65d6fc1..ded80b9 100644
--- a/lib/core/l10n/app_localizations_ru.dart
+++ b/lib/core/l10n/app_localizations_ru.dart
@@ -271,7 +271,7 @@ class AppLocalizationsRu extends AppLocalizations {
String get latestDeals => 'Новые предложения';
@override
- String get restaurantRewards => 'Ресторанные бонусы';
+ String get restaurantRewards => 'Бонусы ресторанов';
@override
String get nationwideShipping => 'Доставка по всей стране';
@@ -296,4 +296,55 @@ class AppLocalizationsRu extends AppLocalizations {
@override
String get categoriesShort => 'Еда, покупки, напитки и т.д.';
+
+ @override
+ String get yourFavourites => 'Избранное';
+
+ @override
+ String get wallet => 'Кошелёк';
+
+ @override
+ String get sendAGift => 'Отправить подарок';
+
+ @override
+ String get businessPreferences => 'Рабочие предпочтения';
+
+ @override
+ String get businessSub => 'Сделайте рабочие обеды быстрее и проще';
+
+ @override
+ String get help => 'Помощь';
+
+ @override
+ String get promotions => 'Акции';
+
+ @override
+ String get uberPass => 'Uber Pass';
+
+ @override
+ String get uberPassSub => 'Присоединяйтесь бесплатно на 1 месяц';
+
+ @override
+ String get deliverWithUber => 'Доставляйте с Uber';
+
+ @override
+ String get settings => 'Настройки';
+
+ @override
+ String get home => 'Главная';
+
+ @override
+ String get browse => 'Категории';
+
+ @override
+ String get baskets => 'Корзина';
+
+ @override
+ String get account => 'Аккаунт';
+
+ @override
+ String get changeLanguage => 'Сменить язык';
+
+ @override
+ String get language => 'Язык';
}
diff --git a/lib/core/l10n/app_localizations_uz.dart b/lib/core/l10n/app_localizations_uz.dart
index 69c7487..52cc231 100644
--- a/lib/core/l10n/app_localizations_uz.dart
+++ b/lib/core/l10n/app_localizations_uz.dart
@@ -271,7 +271,7 @@ class AppLocalizationsUz extends AppLocalizations {
String get latestDeals => 'Yangi chegirmalar';
@override
- String get restaurantRewards => 'Restoran mukofotlari';
+ String get restaurantRewards => 'Restoran bonuslari';
@override
String get nationwideShipping => 'Butun mamlakat bo‘ylab yetkazib berish';
@@ -296,4 +296,55 @@ class AppLocalizationsUz extends AppLocalizations {
@override
String get categoriesShort => 'Ovqat, xaridlar, ichimliklar va boshqalar.';
+
+ @override
+ String get yourFavourites => 'Sevimlilar';
+
+ @override
+ String get wallet => 'Hamyon';
+
+ @override
+ String get sendAGift => 'Sovg‘a yuborish';
+
+ @override
+ String get businessPreferences => 'Biznes sozlamalari';
+
+ @override
+ String get businessSub => 'Ishdagi ovqatlarni tezroq va osonroq qiling';
+
+ @override
+ String get help => 'Yordam';
+
+ @override
+ String get promotions => 'Aksiyalar';
+
+ @override
+ String get uberPass => 'Uber Pass';
+
+ @override
+ String get uberPassSub => '1 oy bepul ulaning';
+
+ @override
+ String get deliverWithUber => 'Uber bilan yetkazib bering';
+
+ @override
+ String get settings => 'Sozlamalar';
+
+ @override
+ String get home => 'Bosh sahifa';
+
+ @override
+ String get browse => 'Kategoriya';
+
+ @override
+ String get baskets => 'Savatcha';
+
+ @override
+ String get account => 'Profil';
+
+ @override
+ String get changeLanguage => 'Tilni o\'zgartirish';
+
+ @override
+ String get language => 'Til';
}
diff --git a/lib/core/theme/app_icons.dart b/lib/core/theme/app_icons.dart
index dfb10b7..b8d6568 100644
--- a/lib/core/theme/app_icons.dart
+++ b/lib/core/theme/app_icons.dart
@@ -34,10 +34,20 @@ abstract class AppIcons {
static const String icCurrentLocation = "$baseUrl/ic_current_loc.svg";
static const String icEdit = "$baseUrl/ic_edit.svg";
static const String icSearch = "$baseUrl/ic_search.svg";
- static const String icCheck= "$baseUrl/ic_check.svg";
- static const String icCheck1= "$baseUrl/ic_check1.svg";
- static const String icArrowRight= "$baseUrl/ic_arrow_right.svg";
-
+ static const String icCheck = "$baseUrl/ic_check.svg";
+ static const String icCheck1 = "$baseUrl/ic_check1.svg";
+ static const String icArrowRight = "$baseUrl/ic_arrow_right.svg";
+ static const String icDeliver = "$baseUrl/ic_deliver.svg";
+ static const String icGift = "$baseUrl/ic_gift.svg";
+ static const String icHelp = "$baseUrl/ic_help.svg";
+ static const String icLike = "$baseUrl/ic_like.svg";
+ static const String icPromotions = "$baseUrl/ic_promotions.svg";
+ static const String icSettings = "$baseUrl/ic_settings.svg";
+ static const String icRewards = "$baseUrl/ic_rewards.svg";
+ static const String icUberPass = "$baseUrl/ic_uber_pass.svg";
+ static const String icWallet = "$baseUrl/ic_wallet.svg";
+ static const String icOrdersSvg = "$baseUrl/ic_orders_svg.svg";
+ static const String icLanguage = "$baseUrl/ic_language.svg";
///.png icons
static const String icBestOverall = "$baseUrl/ic_best.png";
@@ -46,6 +56,8 @@ abstract class AppIcons {
static const String icGlutenFree = "$baseUrl/ic_gluten_free.png";
static const String icAllergyFriendly = "$baseUrl/ic_allergy_friendly.png";
static const String icClock = "$baseUrl/ic_clock.svg";
- static const String icOrders= "$baseUrl/ic_orders.png";
-
+ static const String icOrders = "$baseUrl/ic_orders.png";
+ static const String icUz = "$baseUrl/ic_uzb.png";
+ static const String icRu = "$baseUrl/ic_rus.png";
+ static const String icEn = "$baseUrl/ic_eng.png";
}
diff --git a/lib/core/theme/app_images.dart b/lib/core/theme/app_images.dart
index 4fe7cbd..3350b33 100644
--- a/lib/core/theme/app_images.dart
+++ b/lib/core/theme/app_images.dart
@@ -11,17 +11,16 @@ abstract class AppImages {
static const String imgTakeout = "$baseUrl/img_takeout.png";
static const String imgAsian = "$baseUrl/img_asian.png";
static const String imgIceCream = "$baseUrl/img_ice_cream.png";
- static const String imgHalal= "$baseUrl/img_halal.png";
- static const String imgRetails= "$baseUrl/img_retails.png";
- static const String imgCarribean= "$baseUrl/img_carribean.png";
- static const String imgIndian= "$baseUrl/img_indian.png";
+ static const String imgHalal = "$baseUrl/img_halal.png";
+ static const String imgRetails = "$baseUrl/img_retails.png";
+ static const String imgCarribean = "$baseUrl/img_carribean.png";
+ static const String imgIndian = "$baseUrl/img_indian.png";
static const String imgFrench = "$baseUrl/img_french.png";
static const String imgFastFoods = "$baseUrl/img_fast_food.png";
static const String imgBurger = "$baseUrl/img_burger.png";
static const String imgRide = "$baseUrl/img_ride.png";
- static const String imgChinese= "$baseUrl/img_chinese.png";
+ static const String imgChinese = "$baseUrl/img_chinese.png";
static const String imgDesert = "$baseUrl/img_desert.png";
- static const String imgPickUp= "$baseUrl/img_pick_up.png";
-
-
+ static const String imgPickUp = "$baseUrl/img_pick_up.png";
+ static const String imgAvatar = "$baseUrl/img_avatar.jpg";
}
diff --git a/lib/feature/account/presentation/mixins/account_mixins.dart b/lib/feature/account/presentation/mixins/account_mixins.dart
new file mode 100644
index 0000000..ab4ada7
--- /dev/null
+++ b/lib/feature/account/presentation/mixins/account_mixins.dart
@@ -0,0 +1,21 @@
+import '../../../../core/theme/app_icons.dart';
+
+mixin AccountMixins {
+ final List leadingIcons = [
+ AppIcons.icOrdersSvg,
+ AppIcons.icLike,
+ AppIcons.icRewards,
+ AppIcons.icWallet,
+ AppIcons.icGift,
+ AppIcons.icHelp,
+ AppIcons.icPromotions,
+ AppIcons.icUberPass,
+ AppIcons.icDeliver,
+ AppIcons.icLanguage,
+ AppIcons.icSettings,
+ ];
+
+ final List flags = [AppIcons.icEn, AppIcons.icUz, AppIcons.icRu];
+
+ final List languages = ["English", "O'zbekcha", "Русский"];
+}
diff --git a/lib/feature/account/presentation/pages/account_page/account_page.dart b/lib/feature/account/presentation/pages/account_page/account_page.dart
index 55f6449..1066e42 100644
--- a/lib/feature/account/presentation/pages/account_page/account_page.dart
+++ b/lib/feature/account/presentation/pages/account_page/account_page.dart
@@ -1,3 +1,5 @@
+import 'package:food_delivery_client/feature/account/presentation/pages/account_page/widgets/w_account_body.dart';
+
import '../../../../../food_delivery_client.dart';
class AccountPage extends StatelessWidget {
@@ -5,38 +7,7 @@ class AccountPage extends StatelessWidget {
@override
Widget build(BuildContext context) {
- return BlocBuilder(
- builder: (context, state) {
- return WLayout(
- child: Scaffold(
- body: Center(
- child: Column(
- children: [
- Text(context.loc.iCantSignIn),
- TextButton(
- onPressed: () {
- if (state.currentLocale == Locale("uz")) {
- context.read().add(
- LanguageEvent.changed(Locale('ru')),
- );
- } else if (state.currentLocale == Locale("ru")) {
- context.read().add(
- LanguageEvent.changed(Locale('en')),
- );
- } else {
- context.read().add(
- LanguageEvent.changed(Locale('uz')),
- );
- }
- },
- child: Text("changelang"),
- ),
- ],
- ),
- ),
- ),
- );
- },
- );
+ return WAccountBody();
}
}
+
diff --git a/lib/feature/account/presentation/pages/account_page/widgets/w_account_body.dart b/lib/feature/account/presentation/pages/account_page/widgets/w_account_body.dart
new file mode 100644
index 0000000..14d7d06
--- /dev/null
+++ b/lib/feature/account/presentation/pages/account_page/widgets/w_account_body.dart
@@ -0,0 +1,208 @@
+import 'package:flutter/cupertino.dart';
+import 'package:food_delivery_client/feature/account/presentation/mixins/account_mixins.dart';
+
+import '../../../../../../food_delivery_client.dart';
+
+class WAccountBody extends StatelessWidget with AccountMixins {
+ WAccountBody({super.key});
+
+ @override
+ Widget build(BuildContext context) {
+ final List titles = [
+ context.loc.orders,
+ context.loc.yourFavourites,
+ context.loc.restaurantRewards,
+ context.loc.wallet,
+ context.loc.sendAGift,
+ context.loc.help,
+ context.loc.promotions,
+ context.loc.uberPass,
+ context.loc.deliverWithUber,
+ context.loc.changeLanguage,
+ context.loc.settings,
+ ];
+ return WLayout(
+ child: Scaffold(
+ appBar: PreferredSize(
+ preferredSize: Size.fromHeight(56),
+ child: WAccountAppBar().paddingSymmetric(horizontal: 19),
+ ),
+ body: LayoutBuilder(
+ builder: (context, constraints) => ConstrainedBox(
+ constraints: BoxConstraints(minHeight: constraints.maxHeight),
+ child: ListView.builder(
+ shrinkWrap: true,
+ itemCount: leadingIcons.length,
+ padding: EdgeInsets.symmetric(vertical: 15),
+ physics: const AlwaysScrollableScrollPhysics(),
+ scrollDirection: Axis.vertical,
+ itemBuilder: (context, index) => WAccountRowItem(
+ onTap: () {
+ if (index == 9) {
+ WChangeLanguage().show(context);
+ }
+ },
+ svgPath: leadingIcons[index],
+ title: titles[index],
+ ),
+ ),
+ ),
+ ),
+ ),
+ );
+ }
+}
+
+class WAccountAppBar extends StatelessWidget {
+ const WAccountAppBar({super.key});
+
+ @override
+ Widget build(BuildContext context) {
+ return AppBar(
+ centerTitle: false,
+ leading: ClipRRect(
+ borderRadius: AppUtils.kBorderRadius40,
+ child: SizedBox(
+ child: Image.asset(
+ AppImages.imgAvatar,
+ height: 36,
+ width: 36,
+ fit: BoxFit.cover,
+ ),
+ ),
+ ),
+ title: Text('Felix', style: AppTextStyles.size18Medium),
+ );
+ }
+}
+
+class WAccountRowItem extends StatelessWidget {
+ const WAccountRowItem({
+ super.key,
+ required this.svgPath,
+ required this.title,
+ this.subTitle,
+ this.leadingIcon,
+ required this.onTap,
+ });
+
+ final String svgPath;
+ final String title;
+ final String? subTitle;
+ final Widget? leadingIcon;
+ final VoidCallback onTap;
+
+ @override
+ Widget build(BuildContext context) {
+ return InkWell(
+ onTap: onTap,
+ child: Ink(
+ child: Row(
+ spacing: 24,
+ mainAxisAlignment: MainAxisAlignment.start,
+ children: [
+ leadingIcon ??
+ SizedBox(
+ height: 24,
+ width: 24,
+ child: SvgPicture.asset(svgPath),
+ ),
+ Column(
+ crossAxisAlignment: CrossAxisAlignment.start,
+ children: [
+ Text(title, style: AppTextStyles.size14Medium),
+ if (subTitle != null)
+ Text(
+ subTitle!,
+ style: AppTextStyles.size14Medium.copyWith(
+ color: AppColors.c34A853,
+ ),
+ ),
+ ],
+ ),
+ ],
+ ).paddingSymmetric(vertical: 16, horizontal: 22),
+ ),
+ );
+ }
+}
+
+class WChangeLanguage extends StatelessWidget with AccountMixins {
+ WChangeLanguage({super.key});
+
+ show(BuildContext context) {
+ showModalBottomSheet(
+ context: context,
+ builder: (context) => Wrap(children: [this]),
+ );
+ }
+
+ @override
+ Widget build(BuildContext context) {
+ return BlocBuilder(
+ builder: (context, state) {
+ return Material(
+ color: AppColors.cFFFFFF,
+ borderRadius: AppUtils.kBorderRadiusTop20,
+ child: SizedBox(
+ width: context.w,
+ child: SafeArea(
+ child: Column(
+ children: [
+ 10.verticalSpace,
+ SizedBox(
+ height: 6,
+ width: 100,
+ child: DecoratedBox(
+ decoration: BoxDecoration(
+ color: AppColors.cEEEEEE,
+ borderRadius: AppUtils.kBorderRadius8,
+ ),
+ ),
+ ),
+ 10.verticalSpace,
+ Row(
+ mainAxisAlignment: MainAxisAlignment.spaceBetween,
+ children: [
+ Text(
+ context.loc.changeLanguage,
+ style: AppTextStyles.size24Medium,
+ ),
+ IconButton(
+ onPressed: () {
+ context.pop();
+ },
+ icon: SvgPicture.asset(AppIcons.icClose),
+ ),
+ ],
+ ).paddingSymmetric(horizontal: 16),
+ 15.verticalSpace,
+ Column(
+ children: List.generate(3, (index) {
+ return AppListTile(
+ onPressed: () {
+ context.read().add(
+ LanguageEvent.changed(L10n.locales[index]),
+ );
+ },
+ isSelected: L10n.locales[index] == state.currentLocale,
+ svgPath: '',
+ leading: SizedBox(
+ height: 24,
+ width: 24,
+ child: Image.asset(flags[index]),
+ ),
+ title: languages[index],
+ titleTextStyle: AppTextStyles.size16Medium,
+ );
+ }),
+ ),
+ ],
+ ),
+ ),
+ ),
+ );
+ },
+ );
+ }
+}
diff --git a/lib/feature/common/presentation/widgets/app_list_tile.dart b/lib/feature/common/presentation/widgets/app_list_tile.dart
index 27eec38..7928a79 100644
--- a/lib/feature/common/presentation/widgets/app_list_tile.dart
+++ b/lib/feature/common/presentation/widgets/app_list_tile.dart
@@ -33,7 +33,7 @@ class AppListTile extends StatelessWidget {
subtitle: subTitle,
contentPadding:
contentPadding ?? EdgeInsetsGeometry.only(left: 20, right: 27),
- leading: leading ?? SvgPicture.asset(svgPath),
+ leading:leading ?? SvgPicture.asset(svgPath),
title:
titleWidget ??
Text(title, style: titleTextStyle ?? AppTextStyles.size16Regular),
diff --git a/lib/feature/main/presentation/mixins/main_page_mixin.dart b/lib/feature/main/presentation/mixins/main_page_mixin.dart
index 21dbbfb..e5dc4a9 100644
--- a/lib/feature/main/presentation/mixins/main_page_mixin.dart
+++ b/lib/feature/main/presentation/mixins/main_page_mixin.dart
@@ -24,5 +24,4 @@ mixin MainPageMixin {
SvgPicture.asset(AppIcons.icAccountActive),
];
- final List labels = ["Home", "Browse", "Baskets", 'Account'];
}
diff --git a/lib/feature/main/presentation/pages/main_page/main_page.dart b/lib/feature/main/presentation/pages/main_page/main_page.dart
index ff2ab0d..6277027 100644
--- a/lib/feature/main/presentation/pages/main_page/main_page.dart
+++ b/lib/feature/main/presentation/pages/main_page/main_page.dart
@@ -5,6 +5,12 @@ class MainPage extends StatelessWidget with MainPageMixin {
@override
Widget build(BuildContext context) {
+ final List labels = [
+ context.loc.home,
+ context.loc.browse,
+ context.loc.baskets,
+ context.loc.account,
+ ];
return BlocProvider(
create: (context) => sl(),
child: BlocBuilder(