23 lines
517 B
Dart
23 lines
517 B
Dart
import 'package:flutter/material.dart';
|
|
|
|
import 'Models/managerContext.dart';
|
|
|
|
class AppContext with ChangeNotifier {
|
|
ManagerAppContext _managerContext;
|
|
|
|
AppContext(this._managerContext);
|
|
|
|
getContext() => _managerContext;
|
|
setContext(ManagerAppContext appContext) async {
|
|
_managerContext = appContext;
|
|
|
|
// STORE IT LOCALLY (SQLite)
|
|
//await DatabaseHelper.instance.update(appContext);
|
|
|
|
// Store it in Firestore
|
|
//await FirestoreHelper.instance.add(appContext);
|
|
|
|
notifyListeners();
|
|
}
|
|
}
|