Jonny Borges
Committed by GitHub

Merge pull request #551 from roipeker/change_example_id

dialog style
... ... @@ -519,6 +519,7 @@ extension GetNavigation on GetInterface {
/// Custom UI Dialog.
Future<T> defaultDialog<T>({
String title = "Alert",
TextStyle titleStyle,
Widget content,
VoidCallback onConfirm,
VoidCallback onCancel,
... ... @@ -534,7 +535,9 @@ 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;
... ... @@ -583,18 +586,22 @@ extension GetNavigation on GetInterface {
}));
}
}
return dialog(AlertDialog(
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),
title: Text(title, textAlign: TextAlign.center, style: titleStyle),
content: Column(
crossAxisAlignment: CrossAxisAlignment.center,
mainAxisSize: MainAxisSize.min,
children: [
content ?? Text(middleText ?? "", textAlign: TextAlign.center),
content ??
Text(middleText ?? "",
textAlign: TextAlign.center, style: middleTextStyle),
SizedBox(height: 16),
ButtonTheme(
minWidth: 78.0,
... ... @@ -610,7 +617,8 @@ extension GetNavigation on GetInterface {
),
// actions: actions, // ?? <Widget>[cancelButton, confirmButton],
buttonPadding: EdgeInsets.zero,
));
),
);
}
Future<T> bottomSheet<T>(
... ...