From ed1d5a8f1ca869f187ab9b459d31940542e48389 Mon Sep 17 00:00:00 2001 From: gaaclarke <30870216+gaaclarke@users.noreply.github.com> Date: Tue, 8 Oct 2019 10:05:30 -0700 Subject: [PATCH] Added SystemNavigator.pop "animated" argument. (#41820) --- packages/flutter/lib/src/services/system_navigator.dart | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/packages/flutter/lib/src/services/system_navigator.dart b/packages/flutter/lib/src/services/system_navigator.dart index d48d3afa05..bb30aa8816 100644 --- a/packages/flutter/lib/src/services/system_navigator.dart +++ b/packages/flutter/lib/src/services/system_navigator.dart @@ -21,10 +21,14 @@ class SystemNavigator { /// `dismissViewControllerAnimated:completion:` if the top view /// controller is a `FlutterViewController`. /// + /// The optional `animated` parameter is ignored on all platforms + /// except iOS where it is an argument to the aforementioned + /// methods. + /// /// This method should be preferred over calling `dart:io`'s [exit] /// method, as the latter may cause the underlying platform to act /// as if the application had crashed. - static Future pop() async { - await SystemChannels.platform.invokeMethod('SystemNavigator.pop'); + static Future pop({bool animated}) async { + await SystemChannels.platform.invokeMethod('SystemNavigator.pop', animated); } }