feat: Account page ui done

This commit is contained in:
jahongireshonqulov
2025-10-27 15:14:17 +05:00
parent 651a7e5e9d
commit c528f7a07e
9 changed files with 85 additions and 33 deletions

View File

@@ -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,
),
),
),
);
}
}

View File

@@ -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,