From 0910a78fd6ca05b5aeb959789603aaa6afff4af8 Mon Sep 17 00:00:00 2001 From: Adam Barth Date: Mon, 2 May 2016 15:51:35 -0700 Subject: [PATCH] Improve dartdoc for SystemChrome and SystemSound (#3669) We need to import these enums in order for the dartdoc to linkify correctly. Fixes #3668 --- packages/flutter/lib/src/services/path_provider.dart | 4 ++-- packages/flutter/lib/src/services/system_chrome.dart | 5 +++-- packages/flutter/lib/src/services/system_sound.dart | 3 ++- 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/packages/flutter/lib/src/services/path_provider.dart b/packages/flutter/lib/src/services/path_provider.dart index ff38165ff9..a55909c63a 100644 --- a/packages/flutter/lib/src/services/path_provider.dart +++ b/packages/flutter/lib/src/services/path_provider.dart @@ -41,8 +41,8 @@ class PathProvider { /// /// Examples: /// - /// * iOS: `NSDocumentsDirectory` - /// * Android: The AppData directory. + /// * _iOS_: `NSDocumentsDirectory` + /// * _Android_: The AppData directory. static Future getApplicationDocumentsDirectory() async { return new Directory((await _pathProviderProxy.ptr.applicationDocumentsDirectory()).path); } diff --git a/packages/flutter/lib/src/services/system_chrome.dart b/packages/flutter/lib/src/services/system_chrome.dart index 364668fc38..05040114a7 100644 --- a/packages/flutter/lib/src/services/system_chrome.dart +++ b/packages/flutter/lib/src/services/system_chrome.dart @@ -5,6 +5,7 @@ import 'dart:async'; import 'package:sky_services/flutter/platform/system_chrome.mojom.dart' as mojom; +import 'package:sky_services/flutter/platform/system_chrome.mojom.dart'; import 'shell.dart'; @@ -27,7 +28,7 @@ class SystemChrome { /// /// Arguments: /// - /// * `device_orientation_mask`: A mask of `DeviceOrientation` enum values. + /// * [deviceOrientationMask]: A mask of [DeviceOrientation] enum values. /// The value 0 is synonymous with having all options enabled. /// /// Return Value: @@ -44,7 +45,7 @@ class SystemChrome { /// /// Arguments: /// - /// * `style`: A mask of `SystemUIOverlay` enum values that denotes the overlays + /// * [style]: A mask of [SystemUIOverlay] enum values that denotes the overlays /// to show. /// /// Return Value: diff --git a/packages/flutter/lib/src/services/system_sound.dart b/packages/flutter/lib/src/services/system_sound.dart index e8ca8ad7c2..32249102a6 100644 --- a/packages/flutter/lib/src/services/system_sound.dart +++ b/packages/flutter/lib/src/services/system_sound.dart @@ -5,6 +5,7 @@ import 'dart:async'; import 'package:sky_services/flutter/platform/system_sound.mojom.dart' as mojom; +import 'package:sky_services/flutter/platform/system_sound.mojom.dart' show SystemSoundType; import 'shell.dart'; @@ -31,7 +32,7 @@ class SystemSound { /// boolean indicating if the intent to play the specified sound was /// successfully conveyed to the embedder. No sound may actually play if the /// device is muted or the sound was not available on the platform. - static Future play(mojom.SystemSoundType type) async { + static Future play(SystemSoundType type) async { return (await _systemChromeProxy.ptr.play(type)).success; } }