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
roi peker
2020-09-02 00:36:56 -0300
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
957e7362e432f325d55824deb4ed28edbc14c458
957e7362
1 parent
589a021e
dialog style
Added TextStyle to generalDialog title and message
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 @
957e736
...
...
@@ -500,6 +500,7 @@ extension GetNavigation on GetInterface {
/// Custom UI Dialog.
Future
<
T
>
defaultDialog
<
T
>({
String
title
=
"Alert"
,
TextStyle
titleStyle
,
Widget
content
,
VoidCallback
onConfirm
,
VoidCallback
onCancel
,
...
...
@@ -515,7 +516,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
,
})
{
bool
leanCancel
=
onCancel
!=
null
||
textCancel
!=
null
;
...
...
@@ -564,18 +567,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
,
...
...
@@ -591,7 +598,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