data_saver 0.1.0+3 data_saver: ^0.1.0+3 copied to clipboard
Simple Flutter plugin to check the current Data Saver/Low Data Mode.
data_saver #
data_saver
provides a simple way of checking the current Data Saver (Android) / Low Data Mode (iOS).
Status | Comments |
---|---|
Current stable Flutter version | |
Current beta Flutter version | |
The oldest supported Flutter version |
Getting started #
- Add this package to your dependencies.
dependencies:
data_saver: latest_version
- Get the dependencies.
flutter pub get
Usage #
const dataSaver = DataSaver();
// Mode is one of the following values:
// - enabled
// - whitelisted (Android-only)
// - disabled
final mode = await dataSaver.checkMode();
Behavior on unsupported platforms #
If a particular platform is not supported by this plugin it will return DataSaverMode.disabled
instead of throwing a MissingPluginException
. Support for more platforms is coming soon.
Additional information #
- This package requires at least Flutter 3.16 to work.
- If there are any issues feel free to go to GitHub Issues and report a bug.