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