feat: splash page done
This commit is contained in:
@@ -1,44 +0,0 @@
|
||||
import '../../../../food_delivery_client.dart';
|
||||
|
||||
class AppListTile extends StatelessWidget {
|
||||
const AppListTile({
|
||||
super.key,
|
||||
required this.onPressed,
|
||||
required this.isSelected,
|
||||
required this.svgPath,
|
||||
required this.title,
|
||||
this.contentPadding,
|
||||
this.leading,
|
||||
this.titleWidget,
|
||||
this.trailing,
|
||||
this.titleTextStyle,
|
||||
this.subTitle,
|
||||
});
|
||||
|
||||
final VoidCallback onPressed;
|
||||
final bool isSelected;
|
||||
final String svgPath;
|
||||
final String title;
|
||||
final EdgeInsets? contentPadding;
|
||||
final Widget? leading;
|
||||
final Widget? titleWidget;
|
||||
final Widget? trailing;
|
||||
final TextStyle? titleTextStyle;
|
||||
final Widget? subTitle;
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return ListTile(
|
||||
onTap: onPressed,
|
||||
subtitle: subTitle,
|
||||
contentPadding:
|
||||
contentPadding ?? EdgeInsetsGeometry.only(left: 20, right: 27),
|
||||
leading:leading ?? SvgPicture.asset(svgPath),
|
||||
title:
|
||||
titleWidget ??
|
||||
Text(title, style: titleTextStyle ?? AppTextStyles.size16Regular),
|
||||
trailing:
|
||||
trailing ?? (isSelected ? SvgPicture.asset(AppIcons.icCheck) : null),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,148 +0,0 @@
|
||||
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';
|
||||
|
||||
class WFoodItem extends StatelessWidget {
|
||||
const WFoodItem({
|
||||
super.key,
|
||||
this.imageHeight,
|
||||
this.textStyle1,
|
||||
this.textStyle2,
|
||||
this.enableTag = false,
|
||||
});
|
||||
|
||||
final double? imageHeight;
|
||||
final TextStyle? textStyle1;
|
||||
final TextStyle? textStyle2;
|
||||
final bool enableTag;
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Bounceable(
|
||||
onTap: () {},
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
// CachedNetworkImage(
|
||||
// imageUrl: AppLocaleKeys.imageUrl,
|
||||
// width: 200,
|
||||
// height: 155,
|
||||
// fit: BoxFit.cover,
|
||||
// placeholder: (context, url) => CircularProgressIndicator(),
|
||||
// errorWidget: (context, url, error) => Icon(Icons.error),
|
||||
//
|
||||
// ),
|
||||
SizedBox(
|
||||
height: imageHeight ?? 155,
|
||||
width: context.w,
|
||||
child: Stack(
|
||||
children: [
|
||||
Positioned.fill(
|
||||
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,
|
||||
left: 0,
|
||||
child: Row(
|
||||
children: [
|
||||
if (enableTag)
|
||||
DecoratedBox(
|
||||
decoration: BoxDecoration(
|
||||
color: AppColors.c34A853,
|
||||
borderRadius: AppUtils.kBorderRadiusTop20Bottom20,
|
||||
),
|
||||
child: Text(
|
||||
"5 orders until \$8 reward",
|
||||
style: AppTextStyles.size14Medium.copyWith(
|
||||
color: AppColors.cFFFFFF,
|
||||
),
|
||||
).paddingOnly(top: 2, bottom: 2, left: 20, right: 40),
|
||||
),
|
||||
const Spacer(),
|
||||
IconButton(
|
||||
onPressed: () {},
|
||||
icon: SvgPicture.asset(AppIcons.icDislike),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
8.verticalSpace,
|
||||
Row(
|
||||
children: [
|
||||
Expanded(
|
||||
child: Text(
|
||||
"Adenine Kitchen",
|
||||
style: textStyle1 ?? AppTextStyles.size16Medium,
|
||||
),
|
||||
),
|
||||
SizedBox(
|
||||
height: 24,
|
||||
width: 24,
|
||||
child: DecoratedBox(
|
||||
decoration: BoxDecoration(
|
||||
color: AppColors.cEEEEEE,
|
||||
borderRadius: AppUtils.kBorderRadius28,
|
||||
),
|
||||
child: Center(
|
||||
child: Text("4.4", style: AppTextStyles.size12Regular),
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
// RichText(
|
||||
// text: TextSpan(
|
||||
// text: "\$0.29 Delivery Fee",
|
||||
// children: [TextSpan(text: "10-25 min")],
|
||||
// style: AppTextStyles.size14Regular.copyWith(
|
||||
// color: AppColors.c6B6B6B,
|
||||
// ),
|
||||
// ),
|
||||
// ),
|
||||
Row(
|
||||
children: [
|
||||
Text(
|
||||
"\$0.29 Delivery Fee",
|
||||
style:
|
||||
textStyle2 ??
|
||||
AppTextStyles.size14Regular.copyWith(
|
||||
color: AppColors.c6B6B6B,
|
||||
),
|
||||
),
|
||||
5.horizontalSpace,
|
||||
Icon(Icons.circle, size: 5, color: AppColors.c6B6B6B),
|
||||
5.horizontalSpace,
|
||||
Text(
|
||||
"10-25 min",
|
||||
style:
|
||||
textStyle2 ??
|
||||
AppTextStyles.size14Regular.copyWith(
|
||||
color: AppColors.c6B6B6B,
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
],
|
||||
).paddingSymmetric(horizontal: 15),
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -3,13 +3,13 @@ import '../../../../food_delivery_client.dart';
|
||||
class WLayout extends StatelessWidget {
|
||||
const WLayout({
|
||||
super.key,
|
||||
this.bgColor = AppColors.cFFFFFF,
|
||||
this.bgColor,
|
||||
this.bottom = true,
|
||||
this.top = true,
|
||||
required this.child,
|
||||
});
|
||||
|
||||
final Color bgColor;
|
||||
final Color? bgColor;
|
||||
final bool bottom;
|
||||
final bool top;
|
||||
final Widget child;
|
||||
@@ -17,7 +17,7 @@ class WLayout extends StatelessWidget {
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Container(
|
||||
color: bgColor,
|
||||
color: bgColor ?? context.theme.scaffoldBackgroundColor,
|
||||
child: SafeArea(top: top, bottom: bottom, child: child),
|
||||
);
|
||||
}
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
export 'w_layout.dart';
|
||||
export 'w_food_item.dart';
|
||||
export 'w_divider.dart';
|
||||
export 'w_see_all_raw.dart';
|
||||
export 'w_stories_list_item.dart';
|
||||
|
||||
Reference in New Issue
Block a user