From 57af573b6fbcd6b5bab54d1417f02846ee00b165 Mon Sep 17 00:00:00 2001 From: jahongireshonqulov Date: Sat, 25 Oct 2025 15:29:38 +0500 Subject: [PATCH] feat:browse page ui done --- assets/translations/app_en.arb | 27 ++++- assets/translations/app_ru.arb | 25 ++++- assets/translations/app_uz.arb | 25 ++++- lib/core/constants/app_locale_keys.dart | 3 + lib/core/l10n/app_localizations.dart | 98 ++++++++++++++++++- lib/core/l10n/app_localizations_en.dart | 50 +++++++++- lib/core/l10n/app_localizations_ru.dart | 56 ++++++++++- lib/core/l10n/app_localizations_uz.dart | 56 ++++++++++- lib/core/router/app_routes.dart | 5 +- lib/core/router/routes_name.dart | 1 + lib/core/theme/app_colors.dart | 3 + lib/core/theme/app_textstyles.dart | 7 ++ lib/core/utils/app_utils.dart | 11 +++ lib/feature/browse/browse.dart | 1 + .../browse_page/widgets/w_all_categories.dart | 35 +++++++ .../browse_page/widgets/w_browse_body.dart | 31 +++++- .../browse_page/widgets/w_browse_item.dart | 52 ++++++++++ .../browse_page/widgets/w_top_categories.dart | 36 +++++++ .../pages/search_page/search_page.dart | 10 ++ 19 files changed, 513 insertions(+), 19 deletions(-) create mode 100644 lib/feature/browse/presentation/pages/browse_page/widgets/w_all_categories.dart create mode 100644 lib/feature/browse/presentation/pages/browse_page/widgets/w_browse_item.dart create mode 100644 lib/feature/browse/presentation/pages/browse_page/widgets/w_top_categories.dart create mode 100644 lib/feature/browse/presentation/pages/search_page/search_page.dart diff --git a/assets/translations/app_en.arb b/assets/translations/app_en.arb index 41ded29..a69e1ed 100644 --- a/assets/translations/app_en.arb +++ b/assets/translations/app_en.arb @@ -116,6 +116,31 @@ "addItemsStartBasket": "Add items to start a basket", "basketHint": "Once you add items from a restaurant or store, your basket will appear here.", "startShopping": "Start Shopping", - "orders": "Orders" + "orders": "Orders", + "recentSearches": "Recent searches", + "cafe": "Cafe", + "irish": "Irish", + + "topCategories": "Top Categories", + "breakfastAndBrunch": "Breakfast and Brunch", + "coffeeAndTea": "Coffee and Tea", + "chinese": "Chinese", + "indian": "Indian", + "latestDeals": "Latest Deals", + "restaurantRewards": "Restaurant Rewards", + "bestOverall": "Best Overall", + "nationwideShipping": "Nationwide Shipping", + "mexican": "Mexican", + "fastFood": "Fast Food", + "healthy": "Healthy", + "pizza": "Pizza", + "sandwich": "Sandwich", + "asian": "Asian", + "bakery": "Bakery", + "allCategories": "All categories", + "categoriesShort": "Food, shopping, drinks, etc." + + + } \ No newline at end of file diff --git a/assets/translations/app_ru.arb b/assets/translations/app_ru.arb index 9a62463..d15929b 100644 --- a/assets/translations/app_ru.arb +++ b/assets/translations/app_ru.arb @@ -112,7 +112,30 @@ "addItemsStartBasket": "Добавьте товары, чтобы создать корзину", "basketHint": "Когда вы добавите товары из ресторана или магазина, ваша корзина появится здесь.", "startShopping": "Начать покупки", - "orders": "Заказы" + "orders": "Заказы", + "recentSearches": "Недавние запросы", + "cafe": "Кафе", + "irish": "Ирландская кухня", + "topCategories": "Популярные категории", + "breakfastAndBrunch": "Завтрак и бранч", + "coffeeAndTea": "Кофе и чай", + "chinese": "Китайская кухня", + "indian": "Индийская кухня", + "latestDeals": "Новые предложения", + "restaurantRewards": "Ресторанные бонусы", + "bestOverall": "Лучшие варианты", + "nationwideShipping": "Доставка по всей стране", + "mexican": "Мексиканская кухня", + "fastFood": "Фастфуд", + "healthy": "Здоровая еда", + "pizza": "Пицца", + "sandwich": "Сэндвич", + "asian": "Азиатская кухня", + "bakery": "Пекарня", + "categoriesShort": "Еда, покупки, напитки и т.д.", + "allCategories": "Все категории" + + diff --git a/assets/translations/app_uz.arb b/assets/translations/app_uz.arb index 7464089..5d53187 100644 --- a/assets/translations/app_uz.arb +++ b/assets/translations/app_uz.arb @@ -112,7 +112,30 @@ "addItemsStartBasket": "Savatni boshlash uchun mahsulot qo‘shing", "basketHint": "Restorandan yoki do'kondan mahsulot qo‘shsangiz, savatingiz shu yerda paydo bo‘ladi.", "startShopping": "Xaridni boshlash", - "orders": "Buyurtmalar" + "orders": "Buyurtmalar", + "recentSearches": "Yaqinda qidirilganlar", + "cafe": "Kafe", + "irish": "Irlandcha", + "topCategories": "Eng ommabop toifalar", + "breakfastAndBrunch": "Nonushta va bransh", + "coffeeAndTea": "Qahva va choy", + "chinese": "Xitoy taomlari", + "indian": "Hind taomlari", + "latestDeals": "Yangi chegirmalar", + "restaurantRewards": "Restoran mukofotlari", + "bestOverall": "Eng yaxshilari", + "nationwideShipping": "Butun mamlakat bo‘ylab yetkazib berish", + "mexican": "Meksika taomlari", + "fastFood": "Tezkor ovqatlar", + "healthy": "Sog‘lom ovqatlar", + "pizza": "Pitsa", + "sandwich": "Sendvich", + "asian": "Osiyo taomlari", + "bakery": "Qandolatxona", + "categoriesShort": "Ovqat, xaridlar, ichimliklar va boshqalar.", + "allCategories": "Barcha toifalar" + + diff --git a/lib/core/constants/app_locale_keys.dart b/lib/core/constants/app_locale_keys.dart index cac8232..c752eb1 100644 --- a/lib/core/constants/app_locale_keys.dart +++ b/lib/core/constants/app_locale_keys.dart @@ -10,6 +10,9 @@ abstract class AppLocaleKeys { static const String imageUrl = "https://xsznseejebbai1lj.public.blob.vercel-storage.com/homepage/hero/hero-1.webp"; + static const String foodImageUrl = + "https://www.precisionorthomd.com/wp-content/uploads/2023/10/percision-blog-header-junk-food-102323.jpg"; + static const String lorem = '''Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever diff --git a/lib/core/l10n/app_localizations.dart b/lib/core/l10n/app_localizations.dart index b199548..142ea89 100644 --- a/lib/core/l10n/app_localizations.dart +++ b/lib/core/l10n/app_localizations.dart @@ -427,7 +427,7 @@ abstract class AppLocalizations { /// No description provided for @bestOverall. /// /// In en, this message translates to: - /// **'Best overall'** + /// **'Best Overall'** String get bestOverall; /// No description provided for @priceRange. @@ -555,6 +555,102 @@ abstract class AppLocalizations { /// In en, this message translates to: /// **'Orders'** String get orders; + + /// No description provided for @recentSearches. + /// + /// In en, this message translates to: + /// **'Recent searches'** + String get recentSearches; + + /// No description provided for @cafe. + /// + /// In en, this message translates to: + /// **'Cafe'** + String get cafe; + + /// No description provided for @irish. + /// + /// In en, this message translates to: + /// **'Irish'** + String get irish; + + /// No description provided for @topCategories. + /// + /// In en, this message translates to: + /// **'Top Categories'** + String get topCategories; + + /// No description provided for @breakfastAndBrunch. + /// + /// In en, this message translates to: + /// **'Breakfast and Brunch'** + String get breakfastAndBrunch; + + /// No description provided for @coffeeAndTea. + /// + /// In en, this message translates to: + /// **'Coffee and Tea'** + String get coffeeAndTea; + + /// No description provided for @latestDeals. + /// + /// In en, this message translates to: + /// **'Latest Deals'** + String get latestDeals; + + /// No description provided for @restaurantRewards. + /// + /// In en, this message translates to: + /// **'Restaurant Rewards'** + String get restaurantRewards; + + /// No description provided for @nationwideShipping. + /// + /// In en, this message translates to: + /// **'Nationwide Shipping'** + String get nationwideShipping; + + /// No description provided for @mexican. + /// + /// In en, this message translates to: + /// **'Mexican'** + String get mexican; + + /// No description provided for @fastFood. + /// + /// In en, this message translates to: + /// **'Fast Food'** + String get fastFood; + + /// No description provided for @healthy. + /// + /// In en, this message translates to: + /// **'Healthy'** + String get healthy; + + /// No description provided for @pizza. + /// + /// In en, this message translates to: + /// **'Pizza'** + String get pizza; + + /// No description provided for @sandwich. + /// + /// In en, this message translates to: + /// **'Sandwich'** + String get sandwich; + + /// No description provided for @bakery. + /// + /// In en, this message translates to: + /// **'Bakery'** + String get bakery; + + /// No description provided for @categoriesShort. + /// + /// In en, this message translates to: + /// **'Food, shopping, drinks, etc.'** + String get categoriesShort; } class _AppLocalizationsDelegate diff --git a/lib/core/l10n/app_localizations_en.dart b/lib/core/l10n/app_localizations_en.dart index d8bf109..2c2a205 100644 --- a/lib/core/l10n/app_localizations_en.dart +++ b/lib/core/l10n/app_localizations_en.dart @@ -178,7 +178,7 @@ class AppLocalizationsEn extends AppLocalizations { String get deals => 'Deals'; @override - String get bestOverall => 'Best overall'; + String get bestOverall => 'Best Overall'; @override String get priceRange => 'Price range'; @@ -247,4 +247,52 @@ class AppLocalizationsEn extends AppLocalizations { @override String get orders => 'Orders'; + + @override + String get recentSearches => 'Recent searches'; + + @override + String get cafe => 'Cafe'; + + @override + String get irish => 'Irish'; + + @override + String get topCategories => 'Top Categories'; + + @override + String get breakfastAndBrunch => 'Breakfast and Brunch'; + + @override + String get coffeeAndTea => 'Coffee and Tea'; + + @override + String get latestDeals => 'Latest Deals'; + + @override + String get restaurantRewards => 'Restaurant Rewards'; + + @override + String get nationwideShipping => 'Nationwide Shipping'; + + @override + String get mexican => 'Mexican'; + + @override + String get fastFood => 'Fast Food'; + + @override + String get healthy => 'Healthy'; + + @override + String get pizza => 'Pizza'; + + @override + String get sandwich => 'Sandwich'; + + @override + String get bakery => 'Bakery'; + + @override + String get categoriesShort => 'Food, shopping, drinks, etc.'; } diff --git a/lib/core/l10n/app_localizations_ru.dart b/lib/core/l10n/app_localizations_ru.dart index a609f38..65d6fc1 100644 --- a/lib/core/l10n/app_localizations_ru.dart +++ b/lib/core/l10n/app_localizations_ru.dart @@ -90,7 +90,7 @@ class AppLocalizationsRu extends AppLocalizations { String get takeout => 'На вынос'; @override - String get asian => 'Азиатская'; + String get asian => 'Азиатская кухня'; @override String get iceCream => 'Мороженое'; @@ -105,7 +105,7 @@ class AppLocalizationsRu extends AppLocalizations { String get caribbean => 'Карибская'; @override - String get indian => 'Индийская'; + String get indian => 'Индийская кухня'; @override String get french => 'Французская'; @@ -120,7 +120,7 @@ class AppLocalizationsRu extends AppLocalizations { String get ride => 'Поездка'; @override - String get chinese => 'Китайская'; + String get chinese => 'Китайская кухня'; @override String get dessert => 'Десерт'; @@ -179,7 +179,7 @@ class AppLocalizationsRu extends AppLocalizations { String get deals => 'Скидки'; @override - String get bestOverall => 'Лучший выбор'; + String get bestOverall => 'Лучшие варианты'; @override String get priceRange => 'Диапазон цен'; @@ -248,4 +248,52 @@ class AppLocalizationsRu extends AppLocalizations { @override String get orders => 'Заказы'; + + @override + String get recentSearches => 'Недавние запросы'; + + @override + String get cafe => 'Кафе'; + + @override + String get irish => 'Ирландская кухня'; + + @override + String get topCategories => 'Популярные категории'; + + @override + String get breakfastAndBrunch => 'Завтрак и бранч'; + + @override + String get coffeeAndTea => 'Кофе и чай'; + + @override + String get latestDeals => 'Новые предложения'; + + @override + String get restaurantRewards => 'Ресторанные бонусы'; + + @override + String get nationwideShipping => 'Доставка по всей стране'; + + @override + String get mexican => 'Мексиканская кухня'; + + @override + String get fastFood => 'Фастфуд'; + + @override + String get healthy => 'Здоровая еда'; + + @override + String get pizza => 'Пицца'; + + @override + String get sandwich => 'Сэндвич'; + + @override + String get bakery => 'Пекарня'; + + @override + String get categoriesShort => 'Еда, покупки, напитки и т.д.'; } diff --git a/lib/core/l10n/app_localizations_uz.dart b/lib/core/l10n/app_localizations_uz.dart index 0bd4af8..69c7487 100644 --- a/lib/core/l10n/app_localizations_uz.dart +++ b/lib/core/l10n/app_localizations_uz.dart @@ -90,7 +90,7 @@ class AppLocalizationsUz extends AppLocalizations { String get takeout => 'Olib ketish'; @override - String get asian => 'Osiyo'; + String get asian => 'Osiyo taomlari'; @override String get iceCream => 'Muzqaymoq'; @@ -105,7 +105,7 @@ class AppLocalizationsUz extends AppLocalizations { String get caribbean => 'Karib'; @override - String get indian => 'Hind'; + String get indian => 'Hind taomlari'; @override String get french => 'Fransuz'; @@ -120,7 +120,7 @@ class AppLocalizationsUz extends AppLocalizations { String get ride => 'Yo‘l'; @override - String get chinese => 'Xitoy'; + String get chinese => 'Xitoy taomlari'; @override String get dessert => 'Desert'; @@ -179,7 +179,7 @@ class AppLocalizationsUz extends AppLocalizations { String get deals => 'Aksiyalar'; @override - String get bestOverall => 'Eng yaxshisi'; + String get bestOverall => 'Eng yaxshilari'; @override String get priceRange => 'Narx oralig‘i'; @@ -248,4 +248,52 @@ class AppLocalizationsUz extends AppLocalizations { @override String get orders => 'Buyurtmalar'; + + @override + String get recentSearches => 'Yaqinda qidirilganlar'; + + @override + String get cafe => 'Kafe'; + + @override + String get irish => 'Irlandcha'; + + @override + String get topCategories => 'Eng ommabop toifalar'; + + @override + String get breakfastAndBrunch => 'Nonushta va bransh'; + + @override + String get coffeeAndTea => 'Qahva va choy'; + + @override + String get latestDeals => 'Yangi chegirmalar'; + + @override + String get restaurantRewards => 'Restoran mukofotlari'; + + @override + String get nationwideShipping => 'Butun mamlakat bo‘ylab yetkazib berish'; + + @override + String get mexican => 'Meksika taomlari'; + + @override + String get fastFood => 'Tezkor ovqatlar'; + + @override + String get healthy => 'Sog‘lom ovqatlar'; + + @override + String get pizza => 'Pitsa'; + + @override + String get sandwich => 'Sendvich'; + + @override + String get bakery => 'Qandolatxona'; + + @override + String get categoriesShort => 'Ovqat, xaridlar, ichimliklar va boshqalar.'; } diff --git a/lib/core/router/app_routes.dart b/lib/core/router/app_routes.dart index 6b63c17..d5d5376 100644 --- a/lib/core/router/app_routes.dart +++ b/lib/core/router/app_routes.dart @@ -10,7 +10,6 @@ class AppRoutes { final GoRouter router = GoRouter( navigatorKey: navigatorKey, initialLocation: Routes.splash, - routes: [ GoRoute(path: Routes.splash, builder: (context, state) => SplashPage()), GoRoute( @@ -33,6 +32,10 @@ class AppRoutes { child: RestaurantsByCategoryPage(categoryName: state.extra as String), ), ), + GoRoute( + path: Routes.browse, + pageBuilder: (context, state) => CupertinoPage(child: BrowsePage()), + ), ], ); } diff --git a/lib/core/router/routes_name.dart b/lib/core/router/routes_name.dart index c65b813..b34a8d7 100644 --- a/lib/core/router/routes_name.dart +++ b/lib/core/router/routes_name.dart @@ -5,5 +5,6 @@ abstract class Routes { static const String main = '/main'; static const String categories = '/categories'; static const String filters = '/filters'; + static const String browse = '/browse'; static const String restaurantsByCategory = '/restaurants-by-category'; } diff --git a/lib/core/theme/app_colors.dart b/lib/core/theme/app_colors.dart index 2c38e83..a3eb692 100644 --- a/lib/core/theme/app_colors.dart +++ b/lib/core/theme/app_colors.dart @@ -22,4 +22,7 @@ abstract class AppColors { static const Color c545454 = Color(0xFF545454); static const Color cEFF3FE = Color(0xFFEFF3FE); static const Color c05A357 = Color(0xFF05A357); + static const Color cE8E8E8 = Color(0xFFE8E8E8); + static const Color c660000 = Color(0x66000000); + } diff --git a/lib/core/theme/app_textstyles.dart b/lib/core/theme/app_textstyles.dart index 9246b85..a2161b9 100644 --- a/lib/core/theme/app_textstyles.dart +++ b/lib/core/theme/app_textstyles.dart @@ -77,6 +77,13 @@ abstract class AppTextStyles { fontWeight: FontWeight.w500, ); + static const TextStyle size24Medium = TextStyle( + color: _defaultColor, + fontSize: SizesCons.size_24, + fontFamily: _fontMedium, + fontWeight: FontWeight.w500, + ); + static const TextStyle size16Bold= TextStyle( color: _defaultColor, fontSize: SizesCons.size_16, diff --git a/lib/core/utils/app_utils.dart b/lib/core/utils/app_utils.dart index cb447f7..2bef427 100644 --- a/lib/core/utils/app_utils.dart +++ b/lib/core/utils/app_utils.dart @@ -38,6 +38,9 @@ abstract class AppUtils { static const BorderRadius kBorderRadius14 = BorderRadius.all( Radius.circular(14), ); + static const BorderRadius kBorderRadius15 = BorderRadius.all( + Radius.circular(15), + ); static const BorderRadius kBorderRadius16 = BorderRadius.all( Radius.circular(16), ); @@ -81,6 +84,10 @@ abstract class AppUtils { static const BorderRadius kBorderRadius40 = BorderRadius.all( Radius.circular(40), ); + static const BorderRadius kBorderRadiusTop15 = BorderRadius.only( + topLeft: kRadius15, + topRight: kRadius15, + ); static const BorderRadius kBorderRadiusTop20 = BorderRadius.only( topLeft: kRadius20, topRight: kRadius20, @@ -93,4 +100,8 @@ abstract class AppUtils { bottomRight: kRadius15, topRight: kRadius15, ); + static const BorderRadius kBorderRadiusBottom15 = BorderRadius.only( + bottomLeft: kRadius15, + bottomRight: kRadius15, + ); } diff --git a/lib/feature/browse/browse.dart b/lib/feature/browse/browse.dart index 96f1a82..52503b4 100644 --- a/lib/feature/browse/browse.dart +++ b/lib/feature/browse/browse.dart @@ -1,2 +1,3 @@ export 'presentation/pages/browse_page/browse_page.dart'; export 'package:food_delivery_client/feature/browse/presentation/pages/browse_page/widgets/w_browse_body.dart'; +export 'package:food_delivery_client/feature/browse/presentation/pages/browse_page/widgets/w_browse_item.dart'; diff --git a/lib/feature/browse/presentation/pages/browse_page/widgets/w_all_categories.dart b/lib/feature/browse/presentation/pages/browse_page/widgets/w_all_categories.dart new file mode 100644 index 0000000..998c11d --- /dev/null +++ b/lib/feature/browse/presentation/pages/browse_page/widgets/w_all_categories.dart @@ -0,0 +1,35 @@ +import '../../../../../../food_delivery_client.dart'; + +class WAllCategories extends StatelessWidget { + const WAllCategories({super.key}); + + @override + Widget build(BuildContext context) { + return Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + 25.verticalSpace, + Text( + context.loc.allCategories, + style: AppTextStyles.size24Medium.copyWith(height: 36 / 24), + ), + 11.verticalSpace, + GridView.builder( + itemCount: 10, + shrinkWrap: true, + padding: EdgeInsets.zero, + physics: const NeverScrollableScrollPhysics(), + gridDelegate: SliverGridDelegateWithFixedCrossAxisCount( + crossAxisCount: 2, + mainAxisSpacing: 15, + crossAxisSpacing: 10, + mainAxisExtent: 140, + ), + itemBuilder: (context, index) { + return WBrowseItem(); + }, + ), + ], + ); + } +} diff --git a/lib/feature/browse/presentation/pages/browse_page/widgets/w_browse_body.dart b/lib/feature/browse/presentation/pages/browse_page/widgets/w_browse_body.dart index 6645adc..04847d9 100644 --- a/lib/feature/browse/presentation/pages/browse_page/widgets/w_browse_body.dart +++ b/lib/feature/browse/presentation/pages/browse_page/widgets/w_browse_body.dart @@ -1,3 +1,5 @@ +import 'package:food_delivery_client/feature/browse/presentation/pages/browse_page/widgets/w_all_categories.dart'; +import 'package:food_delivery_client/feature/browse/presentation/pages/browse_page/widgets/w_top_categories.dart'; import 'package:food_delivery_client/feature/common/presentation/widgets/app_text_form_field.dart'; import '../../../../../../food_delivery_client.dart'; @@ -8,12 +10,31 @@ class WBrowseBody extends StatelessWidget { @override Widget build(BuildContext context) { return Column( + crossAxisAlignment: CrossAxisAlignment.start, children: [ - 6.verticalSpace, - AppTextFormField( - controller: TextEditingController(), - prefixIcon: SvgPicture.asset( - AppIcons.icSearch, + DecoratedBox( + decoration: BoxDecoration(color: AppColors.cFFFFFF), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + 10.verticalSpace, + AppTextFormField( + controller: TextEditingController(), + prefixIcon: SvgPicture.asset(AppIcons.icSearch), + hintText: context.loc.categoriesShort, + hintTextStyle: AppTextStyles.size16Medium.copyWith( + color: AppColors.c660000 + ), + ), + 15.verticalSpace, + ], + ), + ), + Expanded( + child: SingleChildScrollView( + child: Column( + children: [WTopCategories(), WAllCategories(), 40.verticalSpace], + ), ), ), ], diff --git a/lib/feature/browse/presentation/pages/browse_page/widgets/w_browse_item.dart b/lib/feature/browse/presentation/pages/browse_page/widgets/w_browse_item.dart new file mode 100644 index 0000000..44354c6 --- /dev/null +++ b/lib/feature/browse/presentation/pages/browse_page/widgets/w_browse_item.dart @@ -0,0 +1,52 @@ +import '../../../../../../food_delivery_client.dart'; + +class WBrowseItem extends StatelessWidget { + const WBrowseItem({ + super.key, + }); + + @override + Widget build(BuildContext context) { + return Bounceable( + onTap: () {}, + child: Ink( + decoration: BoxDecoration( + color: AppColors.cFFFFFF, + borderRadius: AppUtils.kBorderRadius15, + ), + child: Column( + children: [ + ClipRRect( + borderRadius: AppUtils.kBorderRadiusTop15, + child: CachedNetworkImage( + imageUrl: AppLocaleKeys.foodImageUrl, + width: context.w, + height: 96, + fit: BoxFit.cover, + ), + ), + SizedBox( + width: context.w, + child: DecoratedBox( + decoration: BoxDecoration( + borderRadius: AppUtils.kBorderRadiusBottom15, + border: Border.all( + color: AppColors.cE8E8E8, + width: 1, + ), + ), + child: Text( + "Restaurant Rewards", + textAlign: TextAlign.center, + style: AppTextStyles.size16Regular.copyWith( + height: 20 / 16, + ), + ).paddingSymmetric(horizontal: 30), + ), + ), + ], + ), + ), + ); + } +} diff --git a/lib/feature/browse/presentation/pages/browse_page/widgets/w_top_categories.dart b/lib/feature/browse/presentation/pages/browse_page/widgets/w_top_categories.dart new file mode 100644 index 0000000..12b1db4 --- /dev/null +++ b/lib/feature/browse/presentation/pages/browse_page/widgets/w_top_categories.dart @@ -0,0 +1,36 @@ + +import '../../../../../../food_delivery_client.dart'; + +class WTopCategories extends StatelessWidget { + const WTopCategories({super.key}); + + @override + Widget build(BuildContext context) { + return Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Text( + context.loc.topCategories, + style: AppTextStyles.size24Medium.copyWith(height: 36 / 24), + ), + 11.verticalSpace, + GridView.builder( + itemCount:6, + shrinkWrap: true, + padding: EdgeInsets.zero, + physics: const NeverScrollableScrollPhysics(), + gridDelegate: SliverGridDelegateWithFixedCrossAxisCount( + crossAxisCount: 2, + mainAxisSpacing: 15, + crossAxisSpacing: 10, + mainAxisExtent: 140, + ), + itemBuilder: (context, index) { + return WBrowseItem(); + }, + ), + ], + ); + } +} + diff --git a/lib/feature/browse/presentation/pages/search_page/search_page.dart b/lib/feature/browse/presentation/pages/search_page/search_page.dart new file mode 100644 index 0000000..e6b06de --- /dev/null +++ b/lib/feature/browse/presentation/pages/search_page/search_page.dart @@ -0,0 +1,10 @@ +import '../../../../../food_delivery_client.dart'; + +class SearchPage extends StatelessWidget { + const SearchPage({super.key}); + + @override + Widget build(BuildContext context) { + return WLayout(child: Scaffold()); + } +}