feat:browse page ui done
This commit is contained in:
@@ -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();
|
||||
},
|
||||
),
|
||||
],
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -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],
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
|
||||
@@ -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),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -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();
|
||||
},
|
||||
),
|
||||
],
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user