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
Jonny Borges
2020-09-07 15:57:44 -0300
Browse Files
Options
Browse Files
Download
Plain Diff
Committed by
GitHub
2020-09-07 15:57:44 -0300
Commit
18a83da74df330103860c907653280d81e70b5d0
18a83da7
2 parents
07bdbec9
783c3b30
Merge pull request #551 from roipeker/change_example_id
dialog style
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
4 deletions
lib/src/navigation/extension_navigation.dart
lib/src/navigation/extension_navigation.dart
View file @
18a83da
...
...
@@ -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
>(
...
...
Please
register
or
login
to post a comment