clever_settings_flutter 0.1.0+1 copy "clever_settings_flutter: ^0.1.0+1" to clipboard
clever_settings_flutter: ^0.1.0+1 copied to clipboard

A flutter package that provides useful flutter utilities for clever_settings.

Clever Settings Flutter #

style: very good analysis Powered by Mason License: MIT

A flutter package that provides useful flutter utilities for clever_settings.

Installation 💻 #

❗ In order to start using Clever Settings Flutter you must have the Flutter SDK installed on your machine.

Add clever_settings_flutter and clever_settings to your pubspec.yaml:

dependencies:
  clever_settings:
  clever_settings_flutter:

Install it:

flutter packages get

Initialization #

Before you can start using Clever Settings, you need to initialize it first. Call the init function once at the start of your application:

await CleverSettingsFlutter.init();

This will initialize Hive and open the settings database. If you want to configure Hive yourself, you can use CleverSettings.open() after initializing Hive.

Usage 🚀 #

This will only focus on the additional features of clever_settings_flutter. The readme for the basic usage of clever_settings can be found here.

SettingsValueBuilder #

The SettingsValueBuilder is a widget used for building other widgets that depend on a SettingsValue object. It rebuilds whenever the value of the setting changes.

Example usage:

class Settings {
  static const mySetting =
      SettingsValue<bool>(name: 'mySetting', defaultValue: true);
}

...

SettingsValueBuilder(
  setting: Settings.mySetting,
  builder: (context, value, child) {
    return Text(value.toString());
  },
),
1
likes
160
pub points
0%
popularity

Publisher

verified publisherclevertasks.de

A flutter package that provides useful flutter utilities for clever_settings.

Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (LICENSE)

Dependencies

clever_settings, flutter, hive, hive_flutter

More

Packages that depend on clever_settings_flutter