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
Rakesh Lanjewar
2020-12-07 22:14:27 +0530
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
8e12463b71948c9a5451d690eb883918c29ebecf
8e12463b
1 parent
d2aee52c
Added will pop scope to defaultDialog
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
2 deletions
lib/get_navigation/src/extension_navigation.dart
lib/get_navigation/src/extension_navigation.dart
View file @
8e12463
...
...
@@ -314,6 +314,9 @@ extension ExtensionDialog on GetInterface {
double
radius
=
20.0
,
// ThemeData themeData,
List
<
Widget
>
actions
,
// onWillPop Scope
WillPopCallback
onWillPop
,
})
{
var
leanCancel
=
onCancel
!=
null
||
textCancel
!=
null
;
var
leanConfirm
=
onConfirm
!=
null
||
textConfirm
!=
null
;
...
...
@@ -362,8 +365,7 @@ extension ExtensionDialog on GetInterface {
}
}
return
dialog
<
T
>(
AlertDialog
(
Widget
baseAlertDialog
=
AlertDialog
(
titlePadding:
EdgeInsets
.
all
(
8
),
contentPadding:
EdgeInsets
.
all
(
8
),
backgroundColor:
backgroundColor
??
theme
.
dialogBackgroundColor
,
...
...
@@ -392,10 +394,23 @@ extension ExtensionDialog on GetInterface {
),
// actions: actions, // ?? <Widget>[cancelButton, confirmButton],
buttonPadding:
EdgeInsets
.
zero
,
);
if
(
onWillPop
!=
null
)
{
return
dialog
<
T
>(
WillPopScope
(
onWillPop:
onWillPop
,
child:
baseAlertDialog
,
),
barrierDismissible:
barrierDismissible
,
);
}
return
dialog
<
T
>(
baseAlertDialog
,
barrierDismissible:
barrierDismissible
,
);
}
}
extension
ExtensionBottomSheet
on
GetInterface
{
...
...
Please
register
or
login
to post a comment