Refactor codebase resolving warnings and remove self-package imports
This commit is contained in:
23
lib/model/dataHolder.dart
Normal file
23
lib/model/dataHolder.dart
Normal file
@ -0,0 +1,23 @@
|
||||
|
||||
import 'package:flutter/cupertino.dart';
|
||||
import 'package:localstore/localstore.dart';
|
||||
|
||||
import '../api/apiResponse.dart';
|
||||
|
||||
abstract class DataHolder extends ChangeNotifier {
|
||||
|
||||
CollectionRef storage(String path) {
|
||||
return Localstore.instance.collection(path);
|
||||
}
|
||||
|
||||
void run();
|
||||
List<ApiResponse?> properties();
|
||||
|
||||
bool primaryLoading() {
|
||||
for(ApiResponse? element in properties()) {
|
||||
if(element == null) return true;
|
||||
}
|
||||
return false;
|
||||
//return properties().where((element) => element != null).isEmpty;
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user