D1APP-16 no button bottom sheet

This commit is contained in:
MohammadTaha Basiri 2022-01-18 18:13:48 +03:30
parent 58fd0680fe
commit a6607fd5af
2 changed files with 24 additions and 64 deletions

View File

@ -10,6 +10,7 @@ class ActionSheetData {
final IconData? titleIcon;
final Color? titleColor;
final bool hasDismissButton;
final bool withoutButtonMode;
final bool smallDismissButton;
ActionSheetData({
@ -23,5 +24,6 @@ class ActionSheetData {
this.dismissTitle,
this.onDismissed,
this.smallDismissButton = false,
this.withoutButtonMode = false,
});
}

View File

@ -18,15 +18,11 @@ class ActionSheetUtils {
static Future<void> showLogoLoadingIndicator() async {
await showDialog(
context: context,
builder: (context) =>
// _customSystemOverlayStyle(
// child:
Padding(
builder: (context) => Padding(
padding: EdgeInsets.symmetric(
horizontal: MediaQuery.of(context).size.width / 3,
),
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 {
@ -164,6 +121,7 @@ class ActionSheetUtils {
const SizedBox(height: 28),
data.content,
const SizedBox(height: 28),
if (!data.withoutButtonMode)
Row(
children: [
if (data.hasDismissButton)