Toggle navigation
Toggle navigation
This project
Loading...
Sign in
flutter_package
/
fluttertpc_get
Go to a project
Toggle navigation
Projects
Groups
Snippets
Help
Toggle navigation pinning
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Authored by
Jonatas
2020-09-07 16:22:42 -0300
Browse Files
Options
Browse Files
Download
Plain Diff
Commit
aa7fb11d09386b1893193634188d4c71f6cbd8e9
aa7fb11d
2 parents
cfacb4a3
18a83da7
Merge branch 'master' of
https://github.com/jonataslaw/getx
into master
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
35 additions
and
27 deletions
lib/src/navigation/extension_navigation.dart
lib/src/navigation/extension_navigation.dart
View file @
aa7fb11
...
...
@@ -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,34 +586,39 @@ 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
),
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
,
),
)
],
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
,
),
// actions: actions, // ?? <Widget>[cancelButton, confirmButton],
buttonPadding:
EdgeInsets
.
zero
,
));
);
}
Future
<
T
>
bottomSheet
<
T
>(
...
...
Please
register
or
login
to post a comment