feat: Account page ui done
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<uses-permission android:name="android.permission.INTERNET" />
|
||||
<application
|
||||
android:label="food_delivery_client"
|
||||
android:name="${applicationName}"
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
import 'package:flutter/cupertino.dart';
|
||||
import 'package:food_delivery_client/feature/account/presentation/mixins/account_mixins.dart';
|
||||
|
||||
import '../../../../../../food_delivery_client.dart';
|
||||
@@ -33,7 +32,7 @@ class WAccountBody extends StatelessWidget with AccountMixins {
|
||||
child: ListView.builder(
|
||||
shrinkWrap: true,
|
||||
itemCount: leadingIcons.length,
|
||||
padding: EdgeInsets.symmetric(vertical: 15),
|
||||
padding: EdgeInsets.symmetric(vertical:5),
|
||||
physics: const AlwaysScrollableScrollPhysics(),
|
||||
scrollDirection: Axis.vertical,
|
||||
itemBuilder: (context, index) => WAccountRowItem(
|
||||
@@ -70,7 +69,7 @@ class WAccountAppBar extends StatelessWidget {
|
||||
fit: BoxFit.cover,
|
||||
),
|
||||
),
|
||||
),
|
||||
).paddingAll(8),
|
||||
title: Text('Felix', style: AppTextStyles.size18Medium),
|
||||
);
|
||||
}
|
||||
@@ -166,7 +165,7 @@ class WChangeLanguage extends StatelessWidget with AccountMixins {
|
||||
children: [
|
||||
Text(
|
||||
context.loc.changeLanguage,
|
||||
style: AppTextStyles.size24Medium,
|
||||
style: AppTextStyles.size20Medium,
|
||||
),
|
||||
IconButton(
|
||||
onPressed: () {
|
||||
@@ -193,10 +192,11 @@ class WChangeLanguage extends StatelessWidget with AccountMixins {
|
||||
child: Image.asset(flags[index]),
|
||||
),
|
||||
title: languages[index],
|
||||
titleTextStyle: AppTextStyles.size16Medium,
|
||||
titleTextStyle: AppTextStyles.size14Medium,
|
||||
);
|
||||
}),
|
||||
),
|
||||
10.verticalSpace
|
||||
],
|
||||
),
|
||||
),
|
||||
|
||||
@@ -8,6 +8,7 @@ class WBasketHeader extends StatelessWidget {
|
||||
return Column(
|
||||
mainAxisSize: MainAxisSize.max,
|
||||
children: [
|
||||
8.verticalSpace,
|
||||
Align(
|
||||
alignment: AlignmentGeometry.centerRight,
|
||||
child: InkWell(
|
||||
|
||||
@@ -40,7 +40,7 @@ class WAllCategoriesBody extends StatelessWidget {
|
||||
crossAxisCount: 2,
|
||||
mainAxisSpacing: 15,
|
||||
crossAxisSpacing: 10,
|
||||
mainAxisExtent: 140,
|
||||
mainAxisExtent: 175,
|
||||
),
|
||||
itemBuilder: (context, index) {
|
||||
return WBrowseItem();
|
||||
|
||||
@@ -21,27 +21,32 @@ class WBrowseItem extends StatelessWidget {
|
||||
child: CachedNetworkImage(
|
||||
imageUrl: AppLocaleKeys.foodImageUrl,
|
||||
width: context.w,
|
||||
height: 96,
|
||||
height:120,
|
||||
fit: BoxFit.cover,
|
||||
),
|
||||
),
|
||||
SizedBox(
|
||||
width: context.w,
|
||||
child: DecoratedBox(
|
||||
decoration: BoxDecoration(
|
||||
borderRadius: AppUtils.kBorderRadiusBottom15,
|
||||
border: Border.all(
|
||||
color: AppColors.cE8E8E8,
|
||||
width: 1,
|
||||
Expanded(
|
||||
child: SizedBox(
|
||||
width: context.w,
|
||||
child: DecoratedBox(
|
||||
decoration: BoxDecoration(
|
||||
borderRadius: AppUtils.kBorderRadiusBottom15,
|
||||
border: Border.all(
|
||||
color: AppColors.cE8E8E8,
|
||||
width: 1,
|
||||
),
|
||||
),
|
||||
child: Align(
|
||||
alignment: AlignmentGeometry.center,
|
||||
child: Text(
|
||||
"Restaurant",
|
||||
textAlign: TextAlign.center,
|
||||
style: AppTextStyles.size16Regular.copyWith(
|
||||
height: 20 / 16,
|
||||
),
|
||||
).paddingSymmetric(horizontal: 30,vertical:5),
|
||||
),
|
||||
),
|
||||
child: Text(
|
||||
"Restaurant Rewards",
|
||||
textAlign: TextAlign.center,
|
||||
style: AppTextStyles.size16Regular.copyWith(
|
||||
height: 20 / 16,
|
||||
),
|
||||
).paddingSymmetric(horizontal: 30),
|
||||
),
|
||||
),
|
||||
],
|
||||
|
||||
@@ -31,7 +31,7 @@ class WBrowseSkeletonizerItem extends StatelessWidget {
|
||||
decoration: BoxDecoration(
|
||||
borderRadius: AppUtils.kBorderRadiusBottom15,
|
||||
border: Border.all(
|
||||
color: AppColors.cE8E8E8,
|
||||
color: AppColors.cE6E6E6,
|
||||
width: 1,
|
||||
),
|
||||
),
|
||||
|
||||
@@ -39,7 +39,7 @@ class WTopCategoriesBody extends StatelessWidget {
|
||||
crossAxisCount: 2,
|
||||
mainAxisSpacing: 15,
|
||||
crossAxisSpacing: 10,
|
||||
mainAxisExtent: 140,
|
||||
mainAxisExtent: 175,
|
||||
),
|
||||
itemBuilder: (context, index) {
|
||||
return WBrowseItem();
|
||||
|
||||
@@ -0,0 +1,41 @@
|
||||
import '../../../../food_delivery_client.dart';
|
||||
|
||||
class WCachedNetworkImage extends StatelessWidget {
|
||||
const WCachedNetworkImage({
|
||||
super.key,
|
||||
this.borderRadius,
|
||||
required this.imageUrl,
|
||||
this.height,
|
||||
this.width,
|
||||
this.fit,
|
||||
});
|
||||
|
||||
final BorderRadius? borderRadius;
|
||||
final String imageUrl;
|
||||
final double? height;
|
||||
final double? width;
|
||||
final BoxFit? fit;
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return ClipRRect(
|
||||
borderRadius: borderRadius ?? AppUtils.kBorderRadius20,
|
||||
child: CachedNetworkImage(
|
||||
imageUrl: imageUrl,
|
||||
height: height ?? 155,
|
||||
width: width ?? context.w,
|
||||
fit: fit ?? BoxFit.cover,
|
||||
errorWidget: (context, url, error) =>
|
||||
const Center(child: Icon(Icons.error, color: AppColors.cRed)),
|
||||
placeholder: (context, url) => Skeletonizer(
|
||||
enabled: true,
|
||||
child: Container(
|
||||
height: height ?? 150,
|
||||
width: width ?? context.w,
|
||||
color: AppColors.cE6E6E6,
|
||||
),
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -2,6 +2,7 @@ import 'dart:ui';
|
||||
|
||||
import 'package:flutter_bounceable/flutter_bounceable.dart';
|
||||
import 'package:flutter_svg/flutter_svg.dart';
|
||||
import 'package:food_delivery_client/feature/common/presentation/widgets/w_cached_network_image.dart';
|
||||
|
||||
import '../../../../food_delivery_client.dart';
|
||||
|
||||
@@ -41,16 +42,19 @@ class WFoodItem extends StatelessWidget {
|
||||
child: Stack(
|
||||
children: [
|
||||
Positioned.fill(
|
||||
child: CachedNetworkImage(
|
||||
imageUrl: AppLocaleKeys.imageUrl,
|
||||
width: 200,
|
||||
height: 155,
|
||||
fit: BoxFit.cover,
|
||||
placeholder: (context, url) =>
|
||||
Center(child: CircularProgressIndicator.adaptive()),
|
||||
errorWidget: (context, url, error) => Icon(Icons.error),
|
||||
),
|
||||
child: WCachedNetworkImage(imageUrl: AppLocaleKeys.imageUrl),
|
||||
),
|
||||
// Positioned.fill(
|
||||
// child: CachedNetworkImage(
|
||||
// imageUrl: AppLocaleKeys.imageUrl,
|
||||
// width: 200,
|
||||
// height: 155,
|
||||
// fit: BoxFit.cover,
|
||||
// placeholder: (context, url) =>
|
||||
// Center(child: CircularProgressIndicator.adaptive()),
|
||||
// errorWidget: (context, url, error) => Icon(Icons.error),
|
||||
// ),
|
||||
// ),
|
||||
Positioned(
|
||||
top: 10,
|
||||
right: 8,
|
||||
|
||||
Reference in New Issue
Block a user