feat: Account page ui done
This commit is contained in:
@@ -1,4 +1,5 @@
|
|||||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
|
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
|
<uses-permission android:name="android.permission.INTERNET" />
|
||||||
<application
|
<application
|
||||||
android:label="food_delivery_client"
|
android:label="food_delivery_client"
|
||||||
android:name="${applicationName}"
|
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 'package:food_delivery_client/feature/account/presentation/mixins/account_mixins.dart';
|
||||||
|
|
||||||
import '../../../../../../food_delivery_client.dart';
|
import '../../../../../../food_delivery_client.dart';
|
||||||
@@ -33,7 +32,7 @@ class WAccountBody extends StatelessWidget with AccountMixins {
|
|||||||
child: ListView.builder(
|
child: ListView.builder(
|
||||||
shrinkWrap: true,
|
shrinkWrap: true,
|
||||||
itemCount: leadingIcons.length,
|
itemCount: leadingIcons.length,
|
||||||
padding: EdgeInsets.symmetric(vertical: 15),
|
padding: EdgeInsets.symmetric(vertical:5),
|
||||||
physics: const AlwaysScrollableScrollPhysics(),
|
physics: const AlwaysScrollableScrollPhysics(),
|
||||||
scrollDirection: Axis.vertical,
|
scrollDirection: Axis.vertical,
|
||||||
itemBuilder: (context, index) => WAccountRowItem(
|
itemBuilder: (context, index) => WAccountRowItem(
|
||||||
@@ -70,7 +69,7 @@ class WAccountAppBar extends StatelessWidget {
|
|||||||
fit: BoxFit.cover,
|
fit: BoxFit.cover,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
).paddingAll(8),
|
||||||
title: Text('Felix', style: AppTextStyles.size18Medium),
|
title: Text('Felix', style: AppTextStyles.size18Medium),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
@@ -166,7 +165,7 @@ class WChangeLanguage extends StatelessWidget with AccountMixins {
|
|||||||
children: [
|
children: [
|
||||||
Text(
|
Text(
|
||||||
context.loc.changeLanguage,
|
context.loc.changeLanguage,
|
||||||
style: AppTextStyles.size24Medium,
|
style: AppTextStyles.size20Medium,
|
||||||
),
|
),
|
||||||
IconButton(
|
IconButton(
|
||||||
onPressed: () {
|
onPressed: () {
|
||||||
@@ -193,10 +192,11 @@ class WChangeLanguage extends StatelessWidget with AccountMixins {
|
|||||||
child: Image.asset(flags[index]),
|
child: Image.asset(flags[index]),
|
||||||
),
|
),
|
||||||
title: languages[index],
|
title: languages[index],
|
||||||
titleTextStyle: AppTextStyles.size16Medium,
|
titleTextStyle: AppTextStyles.size14Medium,
|
||||||
);
|
);
|
||||||
}),
|
}),
|
||||||
),
|
),
|
||||||
|
10.verticalSpace
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
|||||||
@@ -8,6 +8,7 @@ class WBasketHeader extends StatelessWidget {
|
|||||||
return Column(
|
return Column(
|
||||||
mainAxisSize: MainAxisSize.max,
|
mainAxisSize: MainAxisSize.max,
|
||||||
children: [
|
children: [
|
||||||
|
8.verticalSpace,
|
||||||
Align(
|
Align(
|
||||||
alignment: AlignmentGeometry.centerRight,
|
alignment: AlignmentGeometry.centerRight,
|
||||||
child: InkWell(
|
child: InkWell(
|
||||||
|
|||||||
@@ -40,7 +40,7 @@ class WAllCategoriesBody extends StatelessWidget {
|
|||||||
crossAxisCount: 2,
|
crossAxisCount: 2,
|
||||||
mainAxisSpacing: 15,
|
mainAxisSpacing: 15,
|
||||||
crossAxisSpacing: 10,
|
crossAxisSpacing: 10,
|
||||||
mainAxisExtent: 140,
|
mainAxisExtent: 175,
|
||||||
),
|
),
|
||||||
itemBuilder: (context, index) {
|
itemBuilder: (context, index) {
|
||||||
return WBrowseItem();
|
return WBrowseItem();
|
||||||
|
|||||||
@@ -21,27 +21,32 @@ class WBrowseItem extends StatelessWidget {
|
|||||||
child: CachedNetworkImage(
|
child: CachedNetworkImage(
|
||||||
imageUrl: AppLocaleKeys.foodImageUrl,
|
imageUrl: AppLocaleKeys.foodImageUrl,
|
||||||
width: context.w,
|
width: context.w,
|
||||||
height: 96,
|
height:120,
|
||||||
fit: BoxFit.cover,
|
fit: BoxFit.cover,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
SizedBox(
|
Expanded(
|
||||||
width: context.w,
|
child: SizedBox(
|
||||||
child: DecoratedBox(
|
width: context.w,
|
||||||
decoration: BoxDecoration(
|
child: DecoratedBox(
|
||||||
borderRadius: AppUtils.kBorderRadiusBottom15,
|
decoration: BoxDecoration(
|
||||||
border: Border.all(
|
borderRadius: AppUtils.kBorderRadiusBottom15,
|
||||||
color: AppColors.cE8E8E8,
|
border: Border.all(
|
||||||
width: 1,
|
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(
|
decoration: BoxDecoration(
|
||||||
borderRadius: AppUtils.kBorderRadiusBottom15,
|
borderRadius: AppUtils.kBorderRadiusBottom15,
|
||||||
border: Border.all(
|
border: Border.all(
|
||||||
color: AppColors.cE8E8E8,
|
color: AppColors.cE6E6E6,
|
||||||
width: 1,
|
width: 1,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
|||||||
@@ -39,7 +39,7 @@ class WTopCategoriesBody extends StatelessWidget {
|
|||||||
crossAxisCount: 2,
|
crossAxisCount: 2,
|
||||||
mainAxisSpacing: 15,
|
mainAxisSpacing: 15,
|
||||||
crossAxisSpacing: 10,
|
crossAxisSpacing: 10,
|
||||||
mainAxisExtent: 140,
|
mainAxisExtent: 175,
|
||||||
),
|
),
|
||||||
itemBuilder: (context, index) {
|
itemBuilder: (context, index) {
|
||||||
return WBrowseItem();
|
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_bounceable/flutter_bounceable.dart';
|
||||||
import 'package:flutter_svg/flutter_svg.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';
|
import '../../../../food_delivery_client.dart';
|
||||||
|
|
||||||
@@ -41,16 +42,19 @@ class WFoodItem extends StatelessWidget {
|
|||||||
child: Stack(
|
child: Stack(
|
||||||
children: [
|
children: [
|
||||||
Positioned.fill(
|
Positioned.fill(
|
||||||
child: CachedNetworkImage(
|
child: WCachedNetworkImage(imageUrl: AppLocaleKeys.imageUrl),
|
||||||
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.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(
|
Positioned(
|
||||||
top: 10,
|
top: 10,
|
||||||
right: 8,
|
right: 8,
|
||||||
|
|||||||
Reference in New Issue
Block a user