prefs 3.3.0 copy "prefs: ^3.3.0" to clipboard
prefs: ^3.3.0 copied to clipboard

outdated

A Library Package that utilizes the plugin, shared_preferences, to store and read an app’s preferences in both the Android and the iOS platform.

example/main.dart

import 'package:flutter/material.dart';

import 'package:prefs/prefs.dart';

void main() {
  runApp(MaterialApp(
    home: Scaffold(
      body: Center(
        child: ElevatedButton(
          onPressed: _incrementCounter,
          child: Text('Increment Counter'),
        ),
      ),
    ),
  ));
}

_incrementCounter() async {
  int counter = await Prefs.getIntF('counter');
  counter = counter + 1;
  print('Pressed $counter times.');
  Prefs.setInt('counter', counter);
}
15
likes
0
pub points
83%
popularity

Publisher

verified publisherandrioussolutions.com

A Library Package that utilizes the plugin, shared_preferences, to store and read an app’s preferences in both the Android and the iOS platform.

Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

flutter, shared_preferences, shared_preferences_web

More

Packages that depend on prefs