Unverified Commit 75c07ef1 authored by gaaclarke's avatar gaaclarke Committed by GitHub

Updated the docstring for SystemNavigator.pop.

It had an Android bias and was incorrect for iOS.
parent 8b9e144e
...@@ -10,15 +10,20 @@ import 'system_channels.dart'; ...@@ -10,15 +10,20 @@ import 'system_channels.dart';
class SystemNavigator { class SystemNavigator {
SystemNavigator._(); SystemNavigator._();
/// Instructs the system navigator to remove this activity from the stack and /// Removes the topmost Flutter instance, presenting what was before
/// return to the previous activity. /// it.
/// ///
/// On iOS, calls to this method are ignored because Apple's human interface /// On Android, removes this activity from the stack and returns to
/// guidelines state that applications should not exit themselves. /// the previous activity.
/// ///
/// This method should be preferred over calling `dart:io`'s [exit] method, as /// On iOS, calls `popViewControllerAnimated:` if the root view
/// the latter may cause the underlying platform to act as if the application /// controller is a `UINavigationController`, or
/// had crashed. /// `dismissViewControllerAnimated:completion:` if the top view
/// controller is a `FlutterViewController`.
///
/// 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 { static Future<void> pop() async {
await SystemChannels.platform.invokeMethod<void>('SystemNavigator.pop'); await SystemChannels.platform.invokeMethod<void>('SystemNavigator.pop');
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment