D1APP-16 no button bottom sheet
This commit is contained in:
parent
58fd0680fe
commit
a6607fd5af
|
|
@ -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 withoutButtonMode;
|
||||||
final bool smallDismissButton;
|
final bool smallDismissButton;
|
||||||
|
|
||||||
ActionSheetData({
|
ActionSheetData({
|
||||||
|
|
@ -23,5 +24,6 @@ class ActionSheetData {
|
||||||
this.dismissTitle,
|
this.dismissTitle,
|
||||||
this.onDismissed,
|
this.onDismissed,
|
||||||
this.smallDismissButton = false,
|
this.smallDismissButton = false,
|
||||||
|
this.withoutButtonMode = false,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -18,15 +18,11 @@ class ActionSheetUtils {
|
||||||
static Future<void> showLogoLoadingIndicator() async {
|
static Future<void> showLogoLoadingIndicator() async {
|
||||||
await showDialog(
|
await showDialog(
|
||||||
context: context,
|
context: context,
|
||||||
builder: (context) =>
|
builder: (context) => Padding(
|
||||||
// _customSystemOverlayStyle(
|
|
||||||
// child:
|
|
||||||
Padding(
|
|
||||||
padding: EdgeInsets.symmetric(
|
padding: EdgeInsets.symmetric(
|
||||||
horizontal: MediaQuery.of(context).size.width / 3,
|
horizontal: MediaQuery.of(context).size.width / 3,
|
||||||
),
|
),
|
||||||
child: RiveAnimation.asset(Assets.logoLoadingAnimation),
|
child: RiveAnimation.asset(Assets.logoLoadingAnimation),
|
||||||
// ),
|
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
@ -75,45 +71,6 @@ class ActionSheetUtils {
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
// ignore: avoid_single_cascade_in_expression_statements
|
|
||||||
// Flushbar(
|
|
||||||
// margin: const EdgeInsets.only(left: 16, right: 16, bottom: 16),
|
|
||||||
// borderColor: foregroundColor,
|
|
||||||
// backgroundColor: backgroundColor,
|
|
||||||
// borderRadius: DesignConfig.mediumBorderRadius,
|
|
||||||
// padding: const EdgeInsets.symmetric(vertical: 16),
|
|
||||||
// icon: Icon(
|
|
||||||
// DidvanIcons.info_circle_solid,
|
|
||||||
// color: foregroundColor,
|
|
||||||
// ),
|
|
||||||
// shouldIconPulse: true,
|
|
||||||
// dismissDirection: FlushbarDismissDirection.HORIZONTAL,
|
|
||||||
// flushbarPosition: FlushbarPosition.BOTTOM,
|
|
||||||
// messageText: StatefulBuilder(builder: (context, setState) {
|
|
||||||
// if (isInit) {
|
|
||||||
// Future.delayed(Duration.zero, () {
|
|
||||||
// setState(() {});
|
|
||||||
// isInit = false;
|
|
||||||
// });
|
|
||||||
// }
|
|
||||||
// return Column(
|
|
||||||
// crossAxisAlignment: CrossAxisAlignment.start,
|
|
||||||
// children: [
|
|
||||||
// DidvanText(alertData.message, color: foregroundColor),
|
|
||||||
// AnimatedContainer(
|
|
||||||
// duration: const Duration(seconds: 2),
|
|
||||||
// width: isInit ? MediaQuery.of(context).size.width - 32 : 0,
|
|
||||||
// height: 2,
|
|
||||||
// color: foregroundColor,
|
|
||||||
// ),
|
|
||||||
// ],
|
|
||||||
// );
|
|
||||||
// }),
|
|
||||||
// duration: const Duration(seconds: 2),
|
|
||||||
// boxShadows: [
|
|
||||||
// BoxShadow(color: Theme.of(context).colorScheme.cardBorder),
|
|
||||||
// ],
|
|
||||||
// )..show(context);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static Future<void> showBottomSheet({required ActionSheetData data}) async {
|
static Future<void> showBottomSheet({required ActionSheetData data}) async {
|
||||||
|
|
@ -164,6 +121,7 @@ class ActionSheetUtils {
|
||||||
const SizedBox(height: 28),
|
const SizedBox(height: 28),
|
||||||
data.content,
|
data.content,
|
||||||
const SizedBox(height: 28),
|
const SizedBox(height: 28),
|
||||||
|
if (!data.withoutButtonMode)
|
||||||
Row(
|
Row(
|
||||||
children: [
|
children: [
|
||||||
if (data.hasDismissButton)
|
if (data.hasDismissButton)
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue