Repository navigation
Allow querying Bluetooth service status on iOS (platform interface) - #1099
Conversation
mvanbeusekom
left a comment
There was a problem hiding this comment.
Throughout the PR there are some additional spaces injected and I was wondering why?
It looks like you are trying to improve the distinction between Android and iOS specific documentation. If this is the case maybe we should restructure the documentation and start using markdown lists.
Maybe we should always start the documentation with one general sentence and than split out into a list. For example the documentation for the locationAlways permission could be written like this (note that just like Dart code I tried to keep the max line length at 80 characters):
/// Request permission to query location data when the application is running
/// in the background.
///
/// Depending on the platform and version the requirements are slightly
/// different:
///
/// **Android:**
/// - When running on Android Q and above: Background Location Permission
/// - When running on Android < Q: Fine and Coarse Location
///
/// **iOS:**
/// - When requesting this permission the user needs to grant permission
/// for the `locationWhenInUse` permission first, clicking on the
/// `Allow While Using App` option on the popup. After allowing the
/// permission the user can request the `locationAlways` permission and can
/// click on the `Change To Always Allow` option.| /// always returns `PermissionStatus.denied`, instead use | ||
| /// `Permission.photos`, `Permission.video`, `Permission.audio` or | ||
| /// `Permission.manageExternalStorage`. For more information see our | ||
| /// [FAQ](https://pub.dev/packages/permission_handler#faq). | ||
| /// On Android < TIRAMISU the `READ_EXTERNAL_STORAGE` and | ||
| /// `WRITE_EXTERNAL_STORAGE` permissions are requested (depending on the | ||
| /// definitions in the AndroidManifest.xml) file. |
There was a problem hiding this comment.
nit: what is the reason for the extra spaces here? It looks a bit strange as the first line is indented 2 spaces, while the second line (of the same sentence) is indented 4 spaces.
If the idea is to make it clear there are two different options lets convert it into a list using an dash (-) or asterisk (*).
|
|
||
| /// Android: Allows an application a broad access to external storage in | ||
| /// scoped storage. | ||
| /// scoped storage. |
There was a problem hiding this comment.
nit: redundant spacing
| /// scoped storage. | |
| /// scoped storage. |
| /// shares it with other companies for purposes of tracking across apps and | ||
| /// websites. |
There was a problem hiding this comment.
nit: redundant spacing
| /// shares it with other companies for purposes of tracking across apps and | |
| /// websites. | |
| /// shares it with other companies for purposes of tracking across apps and | |
| /// websites. |
| ///(e.g. BLE peripherals). | ||
| ///iOS: Nothing | ||
| /// Android: Allows the user to look for Bluetooth devices | ||
| /// (e.g. BLE peripherals). |
There was a problem hiding this comment.
nit: redundant spacing:
| /// (e.g. BLE peripherals). | |
| /// (e.g. BLE peripherals). |
| ///Bluetooth devices. | ||
| ///iOS: Nothing | ||
| /// Android: Allows the user to make this device discoverable to other | ||
| /// Bluetooth devices. |
There was a problem hiding this comment.
nit: redundant spacing:
| /// Bluetooth devices. | |
| /// Bluetooth devices. |
d63754f to
ef17d12
Compare
Codecov ReportPatch coverage has no change and project coverage change:
Additional details and impacted files@@ Coverage Diff @@
## main #1099 +/- ##
===========================================
- Coverage 100.00% 93.47% -6.53%
===========================================
Files 1 6 +5
Lines 17 92 +75
===========================================
+ Hits 17 86 +69
- Misses 0 6 +6
Flags with carried forward coverage won't be shown. Click here to find out more.
☔ View full report in Codecov by Sentry. |
mvanbeusekom
left a comment
There was a problem hiding this comment.
Love it! Documentation is much better this way, thanks!
This PR updates the platform interface. It changes
Permission.bluetoothfrom typePermissionto typePermissionWithService, allowing iOS to provide the service's status.Additionally, it cleans up the documentation of the permissions.
This PR is part of feature #773.
Pre-launch Checklist
pubspec.yamlwith an appropriate new version according to the pub versioning philosophy, or this PR is does not need version changes.CHANGELOG.mdto add a description of the change.///).main.dart format .and committed any changes.flutter analyzeand fixed any errors.