Committed by
roi peker
Revert "Merge branch 'master' of https://github.com/jonataslaw/getx into master"
This reverts commit aa7fb11d.
Showing
1 changed file
with
27 additions
and
35 deletions
@@ -519,7 +519,6 @@ extension GetNavigation on GetInterface { | @@ -519,7 +519,6 @@ 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, | ||
523 | Widget content, | 522 | Widget content, |
524 | VoidCallback onConfirm, | 523 | VoidCallback onConfirm, |
525 | VoidCallback onCancel, | 524 | VoidCallback onCancel, |
@@ -535,9 +534,7 @@ extension GetNavigation on GetInterface { | @@ -535,9 +534,7 @@ extension GetNavigation on GetInterface { | ||
535 | Color backgroundColor, | 534 | Color backgroundColor, |
536 | Color buttonColor, | 535 | Color buttonColor, |
537 | String middleText = "Dialog made in 3 lines of code", | 536 | String middleText = "Dialog made in 3 lines of code", |
538 | - TextStyle middleTextStyle, | ||
539 | double radius = 20.0, | 537 | double radius = 20.0, |
540 | - // ThemeData themeData, | ||
541 | List<Widget> actions, | 538 | List<Widget> actions, |
542 | }) { | 539 | }) { |
543 | var leanCancel = onCancel != null || textCancel != null; | 540 | var leanCancel = onCancel != null || textCancel != null; |
@@ -586,39 +583,34 @@ extension GetNavigation on GetInterface { | @@ -586,39 +583,34 @@ extension GetNavigation on GetInterface { | ||
586 | })); | 583 | })); |
587 | } | 584 | } |
588 | } | 585 | } |
589 | - | ||
590 | - return dialog( | ||
591 | - AlertDialog( | ||
592 | - titlePadding: EdgeInsets.all(8), | ||
593 | - contentPadding: EdgeInsets.all(8), | ||
594 | - backgroundColor: backgroundColor ?? theme.dialogBackgroundColor, | ||
595 | - shape: RoundedRectangleBorder( | ||
596 | - borderRadius: BorderRadius.all(Radius.circular(radius))), | ||
597 | - title: Text(title, textAlign: TextAlign.center, style: titleStyle), | ||
598 | - content: Column( | ||
599 | - crossAxisAlignment: CrossAxisAlignment.center, | ||
600 | - mainAxisSize: MainAxisSize.min, | ||
601 | - children: [ | ||
602 | - content ?? | ||
603 | - Text(middleText ?? "", | ||
604 | - textAlign: TextAlign.center, style: middleTextStyle), | ||
605 | - SizedBox(height: 16), | ||
606 | - ButtonTheme( | ||
607 | - minWidth: 78.0, | ||
608 | - height: 34.0, | ||
609 | - child: Wrap( | ||
610 | - alignment: WrapAlignment.center, | ||
611 | - spacing: 8, | ||
612 | - runSpacing: 8, | ||
613 | - children: actions, | ||
614 | - ), | ||
615 | - ) | ||
616 | - ], | ||
617 | - ), | ||
618 | - // actions: actions, // ?? <Widget>[cancelButton, confirmButton], | ||
619 | - buttonPadding: EdgeInsets.zero, | 586 | + return dialog(AlertDialog( |
587 | + titlePadding: EdgeInsets.all(8), | ||
588 | + contentPadding: EdgeInsets.all(8), | ||
589 | + backgroundColor: backgroundColor ?? theme.dialogBackgroundColor, | ||
590 | + shape: RoundedRectangleBorder( | ||
591 | + borderRadius: BorderRadius.all(Radius.circular(radius))), | ||
592 | + title: Text(title, textAlign: TextAlign.center), | ||
593 | + content: Column( | ||
594 | + crossAxisAlignment: CrossAxisAlignment.center, | ||
595 | + mainAxisSize: MainAxisSize.min, | ||
596 | + children: [ | ||
597 | + content ?? Text(middleText ?? "", textAlign: TextAlign.center), | ||
598 | + SizedBox(height: 16), | ||
599 | + ButtonTheme( | ||
600 | + minWidth: 78.0, | ||
601 | + height: 34.0, | ||
602 | + child: Wrap( | ||
603 | + alignment: WrapAlignment.center, | ||
604 | + spacing: 8, | ||
605 | + runSpacing: 8, | ||
606 | + children: actions, | ||
607 | + ), | ||
608 | + ) | ||
609 | + ], | ||
620 | ), | 610 | ), |
621 | - ); | 611 | + // actions: actions, // ?? <Widget>[cancelButton, confirmButton], |
612 | + buttonPadding: EdgeInsets.zero, | ||
613 | + )); | ||
622 | } | 614 | } |
623 | 615 | ||
624 | Future<T> bottomSheet<T>( | 616 | Future<T> bottomSheet<T>( |
-
Please register or login to post a comment