Jonatas
Committed by roi peker

Revert "Merge branch 'master' of https://github.com/jonataslaw/getx into master"

This reverts commit aa7fb11d.
... ... @@ -519,7 +519,6 @@ extension GetNavigation on GetInterface {
/// Custom UI Dialog.
Future<T> defaultDialog<T>({
String title = "Alert",
TextStyle titleStyle,
Widget content,
VoidCallback onConfirm,
VoidCallback onCancel,
... ... @@ -535,9 +534,7 @@ extension GetNavigation on GetInterface {
Color backgroundColor,
Color buttonColor,
String middleText = "Dialog made in 3 lines of code",
TextStyle middleTextStyle,
double radius = 20.0,
// ThemeData themeData,
List<Widget> actions,
}) {
var leanCancel = onCancel != null || textCancel != null;
... ... @@ -586,39 +583,34 @@ extension GetNavigation on GetInterface {
}));
}
}
return dialog(
AlertDialog(
titlePadding: EdgeInsets.all(8),
contentPadding: EdgeInsets.all(8),
backgroundColor: backgroundColor ?? theme.dialogBackgroundColor,
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.all(Radius.circular(radius))),
title: Text(title, textAlign: TextAlign.center, style: titleStyle),
content: Column(
crossAxisAlignment: CrossAxisAlignment.center,
mainAxisSize: MainAxisSize.min,
children: [
content ??
Text(middleText ?? "",
textAlign: TextAlign.center, style: middleTextStyle),
SizedBox(height: 16),
ButtonTheme(
minWidth: 78.0,
height: 34.0,
child: Wrap(
alignment: WrapAlignment.center,
spacing: 8,
runSpacing: 8,
children: actions,
),
)
],
),
// actions: actions, // ?? <Widget>[cancelButton, confirmButton],
buttonPadding: EdgeInsets.zero,
return dialog(AlertDialog(
titlePadding: EdgeInsets.all(8),
contentPadding: EdgeInsets.all(8),
backgroundColor: backgroundColor ?? theme.dialogBackgroundColor,
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.all(Radius.circular(radius))),
title: Text(title, textAlign: TextAlign.center),
content: Column(
crossAxisAlignment: CrossAxisAlignment.center,
mainAxisSize: MainAxisSize.min,
children: [
content ?? Text(middleText ?? "", textAlign: TextAlign.center),
SizedBox(height: 16),
ButtonTheme(
minWidth: 78.0,
height: 34.0,
child: Wrap(
alignment: WrapAlignment.center,
spacing: 8,
runSpacing: 8,
children: actions,
),
)
],
),
);
// actions: actions, // ?? <Widget>[cancelButton, confirmButton],
buttonPadding: EdgeInsets.zero,
));
}
Future<T> bottomSheet<T>(
... ...