get_storage 1.1.2
get_storage: ^1.1.2 copied to clipboard
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 {
@override
Widget build(BuildContext context) {
return MaterialApp(
home: Home(),
);
}
}
class Home extends StatelessWidget {
final box = GetStorage();
@override
Widget build(BuildContext context) {
box.write('key', 'GetX is the Best');
return Scaffold(
body: Center(
child: Text(box.read('key')),
),
);
}
}