D1APP-16 dismiss button synced to design
This commit is contained in:
parent
064e54c5ef
commit
c472ed9dea
|
|
@ -10,6 +10,7 @@ class ActionSheetData {
|
||||||
final IconData? titleIcon;
|
final IconData? titleIcon;
|
||||||
final Color? titleColor;
|
final Color? titleColor;
|
||||||
final bool hasDismissButton;
|
final bool hasDismissButton;
|
||||||
|
final bool smallDismissButton;
|
||||||
|
|
||||||
ActionSheetData({
|
ActionSheetData({
|
||||||
required this.content,
|
required this.content,
|
||||||
|
|
@ -21,5 +22,6 @@ class ActionSheetData {
|
||||||
this.titleIcon,
|
this.titleIcon,
|
||||||
this.dismissTitle,
|
this.dismissTitle,
|
||||||
this.onDismissed,
|
this.onDismissed,
|
||||||
|
this.smallDismissButton = false,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -169,6 +169,7 @@ class _RadarState extends State<Radar> {
|
||||||
await ActionSheetUtils.showBottomSheet(
|
await ActionSheetUtils.showBottomSheet(
|
||||||
data: ActionSheetData(
|
data: ActionSheetData(
|
||||||
title: 'فیلتر جستجو',
|
title: 'فیلتر جستجو',
|
||||||
|
smallDismissButton: true,
|
||||||
titleIcon: DidvanIcons.filter_regular,
|
titleIcon: DidvanIcons.filter_regular,
|
||||||
dismissTitle: 'حذف فیلتر',
|
dismissTitle: 'حذف فیلتر',
|
||||||
confrimTitle: 'نمایش نتایج',
|
confrimTitle: 'نمایش نتایج',
|
||||||
|
|
|
||||||
|
|
@ -119,6 +119,7 @@ class ActionSheetUtils {
|
||||||
),
|
),
|
||||||
if (data.hasDismissButton) const SizedBox(width: 20),
|
if (data.hasDismissButton) const SizedBox(width: 20),
|
||||||
Expanded(
|
Expanded(
|
||||||
|
flex: data.smallDismissButton ? 2 : 1,
|
||||||
child: DidvanButton(
|
child: DidvanButton(
|
||||||
style: ButtonStyleMode.primary,
|
style: ButtonStyleMode.primary,
|
||||||
onPressed: () {
|
onPressed: () {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue