Skip to content

data_saver provides a simple way to check the current Data Saver (Android) / Low Data Mode (iOS).

License

Notifications You must be signed in to change notification settings

n-bernat/data_saver

Repository files navigation

data_saver

Package Publisher MIT License LeanCode Style

data_saver provides a simple way of checking the current Data Saver (Android) / Low Data Mode (iOS).

Status Comments
data_saver - Tests (stable) Current stable Flutter version
data_saver - Tests (beta) Current beta Flutter version
data_saver - Tests (3.22.0) The oldest supported Flutter version

Getting started

  1. Add this package to your dependencies.
dependencies:
  data_saver: latest_version
  1. 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.22 to work.
  • If there are any issues feel free to go to GitHub Issues and report a bug.

Maintainers

About

data_saver provides a simple way to check the current Data Saver (Android) / Low Data Mode (iOS).

Resources

License

Stars

Watchers

Forks