feat: filters added to home page
This commit is contained in:
61
lib/feature/common/presentation/widgets/app_button.dart
Normal file
61
lib/feature/common/presentation/widgets/app_button.dart
Normal file
@@ -0,0 +1,61 @@
|
||||
|
||||
import '../../../../food_delivery_client.dart';
|
||||
|
||||
|
||||
class AppButton extends StatelessWidget {
|
||||
const AppButton({
|
||||
super.key,
|
||||
required this.name,
|
||||
required this.onPressed,
|
||||
this.margin,
|
||||
this.backgroundColor,
|
||||
this.borderRadius,
|
||||
this.height,
|
||||
this.textColor,
|
||||
this.width,
|
||||
this.action,
|
||||
this.trailing,
|
||||
this.mainAxisAlignment,
|
||||
});
|
||||
|
||||
final String name;
|
||||
final VoidCallback onPressed;
|
||||
final EdgeInsets? margin;
|
||||
final Color? backgroundColor;
|
||||
final Color? textColor;
|
||||
final double? borderRadius;
|
||||
final double? width;
|
||||
final double? height;
|
||||
final Widget? action;
|
||||
final Widget? trailing;
|
||||
final MainAxisAlignment? mainAxisAlignment;
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Bounceable(
|
||||
onTap: onPressed,
|
||||
duration: TimeDelayConst.durationMill150,
|
||||
child: Container(
|
||||
width: width ?? double.infinity,
|
||||
height: height ?? 55,
|
||||
margin: margin,
|
||||
alignment: Alignment.center,
|
||||
padding: const EdgeInsets.symmetric(horizontal: 16),
|
||||
decoration: BoxDecoration(
|
||||
color: backgroundColor ?? AppColors.c000000,
|
||||
borderRadius: BorderRadius.circular(borderRadius ?? 0),
|
||||
),
|
||||
child: Row(
|
||||
mainAxisAlignment: mainAxisAlignment ?? MainAxisAlignment.center,
|
||||
children: [
|
||||
action ?? AppUtils.kSizedBox,
|
||||
Text(name, style: AppTextStyles.size16Bold.copyWith(
|
||||
color: AppColors.cFFFFFF
|
||||
)),
|
||||
trailing ?? AppUtils.kSizedBox,
|
||||
],
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,37 @@
|
||||
import '../../../../../../food_delivery_client.dart';
|
||||
|
||||
class WCustomModalBottomSheet extends StatelessWidget {
|
||||
const WCustomModalBottomSheet({super.key, required this.child});
|
||||
|
||||
final Widget child;
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Material(
|
||||
color: AppColors.cFFFFFF,
|
||||
borderRadius: AppUtils.kBorderRadiusTop20,
|
||||
child: SafeArea(
|
||||
child: SizedBox(
|
||||
width: context.w,
|
||||
child: Column(
|
||||
children: [
|
||||
10.verticalSpace,
|
||||
SizedBox(
|
||||
height: 6,
|
||||
width: 100,
|
||||
child: DecoratedBox(
|
||||
decoration: BoxDecoration(
|
||||
borderRadius: AppUtils.kBorderRadius6,
|
||||
color: AppColors.cE6E6E6.newWithOpacity(.6),
|
||||
),
|
||||
),
|
||||
),
|
||||
10.verticalSpace,
|
||||
child,
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -3,3 +3,5 @@ export 'w_food_item.dart';
|
||||
export 'w_divider.dart';
|
||||
export 'w_see_all_raw.dart';
|
||||
export 'w_stories_list_item.dart';
|
||||
export 'w_custom_modal_bottom_sheet.dart';
|
||||
export 'app_button.dart';
|
||||
|
||||
Reference in New Issue
Block a user