feat:filters done
This commit is contained in:
44
lib/feature/common/presentation/widgets/app_list_tile.dart
Normal file
44
lib/feature/common/presentation/widgets/app_list_tile.dart
Normal file
@@ -0,0 +1,44 @@
|
||||
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),
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -5,3 +5,4 @@ export 'w_see_all_raw.dart';
|
||||
export 'w_stories_list_item.dart';
|
||||
export 'w_custom_modal_bottom_sheet.dart';
|
||||
export 'app_button.dart';
|
||||
export 'app_list_tile.dart';
|
||||
|
||||
Reference in New Issue
Block a user