Unverified Commit 37c10acb authored by Gary Qian's avatar Gary Qian Committed by GitHub

Use 'Future<void>' insted of 'Future<Null>' in SystemChrome (#22583)

parent 8d76d37f
......@@ -237,7 +237,7 @@ class SystemChrome {
/// The `orientation` argument is a list of [DeviceOrientation] enum values.
/// The empty list causes the application to defer to the operating system
/// default.
static Future<Null> setPreferredOrientations(List<DeviceOrientation> orientations) async {
static Future<void> setPreferredOrientations(List<DeviceOrientation> orientations) async {
await SystemChannels.platform.invokeMethod(
'SystemChrome.setPreferredOrientations',
_stringify(orientations),
......@@ -249,7 +249,7 @@ class SystemChrome {
///
/// Any part of the description that is unsupported on the current platform
/// will be ignored.
static Future<Null> setApplicationSwitcherDescription(ApplicationSwitcherDescription description) async {
static Future<void> setApplicationSwitcherDescription(ApplicationSwitcherDescription description) async {
await SystemChannels.platform.invokeMethod(
'SystemChrome.setApplicationSwitcherDescription',
<String, dynamic>{
......@@ -281,7 +281,7 @@ class SystemChrome {
/// after a delay of 1 second. This can be achieved through [restoreSystemUIOverlays]
/// or calling this again. Otherwise, the original UI overlay settings will be
/// automatically restored only when the application loses and regains focus.
static Future<Null> setEnabledSystemUIOverlays(List<SystemUiOverlay> overlays) async {
static Future<void> setEnabledSystemUIOverlays(List<SystemUiOverlay> overlays) async {
await SystemChannels.platform.invokeMethod(
'SystemChrome.setEnabledSystemUIOverlays',
_stringify(overlays),
......@@ -297,7 +297,7 @@ class SystemChrome {
///
/// On Android, the system UI cannot be changed until 1 second after the previous
/// change. This is to prevent malware from permanently hiding navigation buttons.
static Future<Null> restoreSystemUIOverlays() async {
static Future<void> restoreSystemUIOverlays() async {
await SystemChannels.platform.invokeMethod(
'SystemChrome.restoreSystemUIOverlays',
null,
......
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