Committed by
GitHub
Merge pull request #3011 from leeyisoft/master
The default behavior for Get.defaultDialog's onCancel method should be closeAllDialogs();
Showing
1 changed file
with
6 additions
and
2 deletions
@@ -196,8 +196,12 @@ extension ExtensionDialog on GetInterface { | @@ -196,8 +196,12 @@ extension ExtensionDialog on GetInterface { | ||
196 | borderRadius: BorderRadius.circular(radius)), | 196 | borderRadius: BorderRadius.circular(radius)), |
197 | ), | 197 | ), |
198 | onPressed: () { | 198 | onPressed: () { |
199 | - onCancel?.call(); | ||
200 | - back(); | 199 | + if (onCancel == null) { |
200 | + //TODO: Close current dialog after api change | ||
201 | + closeAllDialogs(); | ||
202 | + } else { | ||
203 | + onCancel.call(); | ||
204 | + } | ||
201 | }, | 205 | }, |
202 | child: Text( | 206 | child: Text( |
203 | textCancel ?? "Cancel", | 207 | textCancel ?? "Cancel", |
-
Please register or login to post a comment