updated project style guidelines
This commit is contained in:
@ -20,8 +20,8 @@ abstract class RequestCache<T extends ApiResponse?> {
|
||||
|
||||
static void ignore(Exception e) {}
|
||||
|
||||
void start(String file, String document) async {
|
||||
Map<String, dynamic>? tableData = await Localstore.instance.collection(file).doc(document).get();
|
||||
Future<void> start(String file, String document) async {
|
||||
var tableData = await Localstore.instance.collection(file).doc(document).get();
|
||||
if(tableData != null) {
|
||||
onUpdate(onLocalData(tableData['json']));
|
||||
}
|
||||
@ -31,7 +31,7 @@ abstract class RequestCache<T extends ApiResponse?> {
|
||||
}
|
||||
|
||||
try {
|
||||
T newValue = await onLoad();
|
||||
var newValue = await onLoad();
|
||||
onUpdate(newValue);
|
||||
|
||||
Localstore.instance.collection(file).doc(document).set({
|
||||
@ -46,4 +46,4 @@ abstract class RequestCache<T extends ApiResponse?> {
|
||||
T onLocalData(String json);
|
||||
Future<T> onLoad();
|
||||
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user