datalocal 1.0.13 datalocal: ^1.0.13 copied to clipboard
Flutter dependency to save data via local saved with state, easy to use and fast.
datalocal #
Flutter local data saved with state
You can try it on datalocal.web.app.
Usage #
import 'package:datalocal/datalocal.dart';
...
Future<void> initialize() async {
state = await DataLocal.create(
"notes",
onRefresh: () {
setState(() {});
},
);
state.onRefresh = () {
data = state.data;
setState(() {});
};
state.refresh();
...
...
DataLocal #
[DataLocal] is a class to initialize and save any state of data
For example:
...
state = await DataLocal.create(
"notes",
onRefresh: () {
setState(() {});
},
);
state.onRefresh = () {
data = state.data;
setState(() {});
};
state.refresh();
loading = false;
setState(() {});
...