get_storage 1.1.1 copy "get_storage: ^1.1.1" to clipboard
get_storage: ^1.1.1 copied to clipboard

outdated

A fast, extra light and synchronous key-value storage written entirely in Dart

example/lib/main.dart

import 'package:flutter/material.dart';
import 'package:get_storage/get_storage.dart';

void main() async {
  await GetStorage.init();
  runApp(App());
}

class App extends StatelessWidget {
  const App({Key key}) : super(key: key);

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      home: Home(),
    );
  }
}

class Home extends StatefulWidget {
  const Home({Key key}) : super(key: key);

  @override
  _HomeState createState() => _HomeState();
}

class _HomeState extends State<Home> {
  GetStorage g = GetStorage();

  @override
  void initState() {
    g.write('key', 'GetX is the Best');
    super.initState();
  }

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      body: Center(
        child: Text(g.read('key')),
      ),
    );
  }
}
1643
likes
0
pub points
100%
popularity

Publisher

verified publishergetx.site

A fast, extra light and synchronous key-value storage written entirely in Dart

Repository (GitHub)
View/report issues

License

unknown (LICENSE)

Dependencies

flutter, path_provider

More

Packages that depend on get_storage