app_settings_ohos 1.0.1 copy "app_settings_ohos: ^1.0.1" to clipboard
app_settings_ohos: ^1.0.1 copied to clipboard

A Flutter plugin for opening ohos phone settings from an app.

app_settings_ohos #

https://pub.dev/packages/app_settings_ohos

A Flutter plugin for accessing phone settings on ohos devices from a Flutter application.

Use #

dependencies:
  app_settings_ohos: any

Installation #

First, add app_settings_ohos as a dependency in your pubspec.yaml file.

flutter pub add app_settings_ohos

Next, import 'app_settings_ohos.dart' into your dart code.

import 'package:app_settings_ohos/app_settings_ohos.dart';
target 'Runner' do
  use_frameworks!

Usage #

Open the settings of the application using AppSettings.openAppSettings(). By default, AppSettingsType.settings is used as the type, which opens the general application settings. If the given type is not supported on the current platform, the general settings are opened instead.

ohos If 'asOtherTask' is set to true, the settings page will open in another 'ability'.

Widget build(BuildContext context) {
  return ElevatedButton(
    onPressed: () => AppSettings.openAppSettings(type: AppSettingsType.location,asAnotherTask: true),
    child: const Text('Open Location Settings'),
  );
}

Settings panels are not supported on ohos platforms.

0
likes
0
points
24
downloads

Publisher

unverified uploader

Weekly Downloads

A Flutter plugin for opening ohos phone settings from an app.

Repository

License

unknown (license)

Dependencies

flutter, plugin_platform_interface

More

Packages that depend on app_settings_ohos

Packages that implement app_settings_ohos