Jonny Borges
Committed by GitHub

Merge pull request #551 from roipeker/change_example_id

dialog style
@@ -519,6 +519,7 @@ extension GetNavigation on GetInterface { @@ -519,6 +519,7 @@ extension GetNavigation on GetInterface {
519 /// Custom UI Dialog. 519 /// Custom UI Dialog.
520 Future<T> defaultDialog<T>({ 520 Future<T> defaultDialog<T>({
521 String title = "Alert", 521 String title = "Alert",
  522 + TextStyle titleStyle,
522 Widget content, 523 Widget content,
523 VoidCallback onConfirm, 524 VoidCallback onConfirm,
524 VoidCallback onCancel, 525 VoidCallback onCancel,
@@ -534,7 +535,9 @@ extension GetNavigation on GetInterface { @@ -534,7 +535,9 @@ extension GetNavigation on GetInterface {
534 Color backgroundColor, 535 Color backgroundColor,
535 Color buttonColor, 536 Color buttonColor,
536 String middleText = "Dialog made in 3 lines of code", 537 String middleText = "Dialog made in 3 lines of code",
  538 + TextStyle middleTextStyle,
537 double radius = 20.0, 539 double radius = 20.0,
  540 + // ThemeData themeData,
538 List<Widget> actions, 541 List<Widget> actions,
539 }) { 542 }) {
540 var leanCancel = onCancel != null || textCancel != null; 543 var leanCancel = onCancel != null || textCancel != null;
@@ -583,18 +586,22 @@ extension GetNavigation on GetInterface { @@ -583,18 +586,22 @@ extension GetNavigation on GetInterface {
583 })); 586 }));
584 } 587 }
585 } 588 }
586 - return dialog(AlertDialog( 589 +
  590 + return dialog(
  591 + AlertDialog(
587 titlePadding: EdgeInsets.all(8), 592 titlePadding: EdgeInsets.all(8),
588 contentPadding: EdgeInsets.all(8), 593 contentPadding: EdgeInsets.all(8),
589 backgroundColor: backgroundColor ?? theme.dialogBackgroundColor, 594 backgroundColor: backgroundColor ?? theme.dialogBackgroundColor,
590 shape: RoundedRectangleBorder( 595 shape: RoundedRectangleBorder(
591 borderRadius: BorderRadius.all(Radius.circular(radius))), 596 borderRadius: BorderRadius.all(Radius.circular(radius))),
592 - title: Text(title, textAlign: TextAlign.center), 597 + title: Text(title, textAlign: TextAlign.center, style: titleStyle),
593 content: Column( 598 content: Column(
594 crossAxisAlignment: CrossAxisAlignment.center, 599 crossAxisAlignment: CrossAxisAlignment.center,
595 mainAxisSize: MainAxisSize.min, 600 mainAxisSize: MainAxisSize.min,
596 children: [ 601 children: [
597 - content ?? Text(middleText ?? "", textAlign: TextAlign.center), 602 + content ??
  603 + Text(middleText ?? "",
  604 + textAlign: TextAlign.center, style: middleTextStyle),
598 SizedBox(height: 16), 605 SizedBox(height: 16),
599 ButtonTheme( 606 ButtonTheme(
600 minWidth: 78.0, 607 minWidth: 78.0,
@@ -610,7 +617,8 @@ extension GetNavigation on GetInterface { @@ -610,7 +617,8 @@ extension GetNavigation on GetInterface {
610 ), 617 ),
611 // actions: actions, // ?? <Widget>[cancelButton, confirmButton], 618 // actions: actions, // ?? <Widget>[cancelButton, confirmButton],
612 buttonPadding: EdgeInsets.zero, 619 buttonPadding: EdgeInsets.zero,
613 - )); 620 + ),
  621 + );
614 } 622 }
615 623
616 Future<T> bottomSheet<T>( 624 Future<T> bottomSheet<T>(