Added SystemNavigator.pop "animated" argument. (#41820)

This commit is contained in:
gaaclarke
2019-10-08 10:05:30 -07:00
committed by GitHub
parent 70e753a2a7
commit ed1d5a8f1c

View File

@@ -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<void> pop() async {
await SystemChannels.platform.invokeMethod<void>('SystemNavigator.pop');
static Future<void> pop({bool animated}) async {
await SystemChannels.platform.invokeMethod<void>('SystemNavigator.pop', animated);
}
}