setAutoResumeEnabled method

Future<void> setAutoResumeEnabled(
  1. bool enabled
)

Sets whether this activity's task should be moved to the front when the system exits ambient mode.

If true, the activity's task may be moved to the front if it was the last activity to be running when ambient started, depending on how much time the system spent in ambient mode.

Implementation

Future<void> setAutoResumeEnabled(bool enabled) async {
  try {
    await _channel.invokeMethod<String>(
      'setAutoResumeEnabled',
      {'enabled': enabled},
    );
  } on PlatformException catch (e, st) {
    debugPrint('Error calling setAutoResumeEnabled: $e\n$st');
    rethrow;
  }
}