-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Added AppSettings to open the app settings
- Loading branch information
1 parent
48a9253
commit 64bdc0e
Showing
4 changed files
with
97 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,9 @@ | ||
# 0.10.0 | ||
|
||
## Feat | ||
|
||
- Added AppSettings to open the app settings | ||
|
||
# 0.9.0 | ||
|
||
## Feat | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,89 @@ | ||
import 'package:app_settings/app_settings.dart' as app_settings; | ||
|
||
class AppSettings { | ||
static Future<void> openAccessibilitySettings({ | ||
bool asAnotherTask = false, | ||
}) async => | ||
await app_settings.AppSettings.openAppSettings( | ||
type: app_settings.AppSettingsType.accessibility, | ||
asAnotherTask: asAnotherTask, | ||
); | ||
|
||
static Future<void> openAppSettings({ | ||
bool asAnotherTask = false, | ||
}) async => | ||
await app_settings.AppSettings.openAppSettings( | ||
type: app_settings.AppSettingsType.settings, | ||
asAnotherTask: asAnotherTask, | ||
); | ||
|
||
static Future<void> openBatteryOptimizationSettings({ | ||
bool asAnotherTask = false, | ||
}) async => | ||
await app_settings.AppSettings.openAppSettings( | ||
type: app_settings.AppSettingsType.batteryOptimization, | ||
asAnotherTask: asAnotherTask, | ||
); | ||
|
||
static Future<void> openBluetoothSettings({ | ||
bool asAnotherTask = false, | ||
}) async => | ||
await app_settings.AppSettings.openAppSettings( | ||
type: app_settings.AppSettingsType.bluetooth, | ||
asAnotherTask: asAnotherTask, | ||
); | ||
|
||
static Future<void> openHotspotSettings({ | ||
bool asAnotherTask = false, | ||
}) async => | ||
await app_settings.AppSettings.openAppSettings( | ||
type: app_settings.AppSettingsType.hotspot, | ||
asAnotherTask: asAnotherTask, | ||
); | ||
|
||
static Future<void> openLocationSettings({ | ||
bool asAnotherTask = false, | ||
}) async => | ||
await app_settings.AppSettings.openAppSettings( | ||
type: app_settings.AppSettingsType.location, | ||
asAnotherTask: asAnotherTask, | ||
); | ||
|
||
static Future<void> openNotificationSettings({ | ||
bool asAnotherTask = false, | ||
}) async => | ||
await app_settings.AppSettings.openAppSettings( | ||
type: app_settings.AppSettingsType.notification, | ||
asAnotherTask: asAnotherTask, | ||
); | ||
|
||
static Future<void> openWifiSettings({ | ||
bool asAnotherTask = false, | ||
}) async => | ||
await app_settings.AppSettings.openAppSettings( | ||
type: app_settings.AppSettingsType.wifi, | ||
asAnotherTask: asAnotherTask, | ||
); | ||
|
||
// static Android Setting Panels | ||
|
||
static Future<void> openWifiSettingsPannel() async => | ||
await app_settings.AppSettings.openAppSettingsPanel( | ||
app_settings.AppSettingsPanelType.wifi, | ||
); | ||
|
||
static Future<void> openInternetConnectivitySettingsPannel() async => | ||
await app_settings.AppSettings.openAppSettingsPanel( | ||
app_settings.AppSettingsPanelType.internetConnectivity, | ||
); | ||
|
||
static Future<void> openNfcSettingsPannel() async => | ||
await app_settings.AppSettings.openAppSettingsPanel( | ||
app_settings.AppSettingsPanelType.nfc, | ||
); | ||
|
||
static Future<void> openVolumeSettingsPannel() async => | ||
await app_settings.AppSettings.openAppSettingsPanel( | ||
app_settings.AppSettingsPanelType.volume, | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters