Use 'Future<void>' insted of 'Future<Null>' in SystemChrome (#22583)
This commit is contained in:
parent
8d76d37f33
commit
37c10acb97
@ -237,7 +237,7 @@ class SystemChrome {
|
|||||||
/// The `orientation` argument is a list of [DeviceOrientation] enum values.
|
/// The `orientation` argument is a list of [DeviceOrientation] enum values.
|
||||||
/// The empty list causes the application to defer to the operating system
|
/// The empty list causes the application to defer to the operating system
|
||||||
/// default.
|
/// default.
|
||||||
static Future<Null> setPreferredOrientations(List<DeviceOrientation> orientations) async {
|
static Future<void> setPreferredOrientations(List<DeviceOrientation> orientations) async {
|
||||||
await SystemChannels.platform.invokeMethod(
|
await SystemChannels.platform.invokeMethod(
|
||||||
'SystemChrome.setPreferredOrientations',
|
'SystemChrome.setPreferredOrientations',
|
||||||
_stringify(orientations),
|
_stringify(orientations),
|
||||||
@ -249,7 +249,7 @@ class SystemChrome {
|
|||||||
///
|
///
|
||||||
/// Any part of the description that is unsupported on the current platform
|
/// Any part of the description that is unsupported on the current platform
|
||||||
/// will be ignored.
|
/// will be ignored.
|
||||||
static Future<Null> setApplicationSwitcherDescription(ApplicationSwitcherDescription description) async {
|
static Future<void> setApplicationSwitcherDescription(ApplicationSwitcherDescription description) async {
|
||||||
await SystemChannels.platform.invokeMethod(
|
await SystemChannels.platform.invokeMethod(
|
||||||
'SystemChrome.setApplicationSwitcherDescription',
|
'SystemChrome.setApplicationSwitcherDescription',
|
||||||
<String, dynamic>{
|
<String, dynamic>{
|
||||||
@ -281,7 +281,7 @@ class SystemChrome {
|
|||||||
/// after a delay of 1 second. This can be achieved through [restoreSystemUIOverlays]
|
/// after a delay of 1 second. This can be achieved through [restoreSystemUIOverlays]
|
||||||
/// or calling this again. Otherwise, the original UI overlay settings will be
|
/// or calling this again. Otherwise, the original UI overlay settings will be
|
||||||
/// automatically restored only when the application loses and regains focus.
|
/// 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(
|
await SystemChannels.platform.invokeMethod(
|
||||||
'SystemChrome.setEnabledSystemUIOverlays',
|
'SystemChrome.setEnabledSystemUIOverlays',
|
||||||
_stringify(overlays),
|
_stringify(overlays),
|
||||||
@ -297,7 +297,7 @@ class SystemChrome {
|
|||||||
///
|
///
|
||||||
/// On Android, the system UI cannot be changed until 1 second after the previous
|
/// 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.
|
/// 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(
|
await SystemChannels.platform.invokeMethod(
|
||||||
'SystemChrome.restoreSystemUIOverlays',
|
'SystemChrome.restoreSystemUIOverlays',
|
||||||
null,
|
null,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user