mirror of
https://github.com/SyncrowIOT/web.git
synced 2025-07-10 07:07:19 +00:00
removed project cubit from all classes
This commit is contained in:
@ -1,19 +0,0 @@
|
||||
import 'package:flutter_bloc/flutter_bloc.dart';
|
||||
import 'package:flutter_secure_storage/flutter_secure_storage.dart';
|
||||
|
||||
class ProjectCubit extends Cubit<String?> {
|
||||
final FlutterSecureStorage storage;
|
||||
static const String projectKey = "selected_project_uuid";
|
||||
|
||||
ProjectCubit(this.storage) : super(null);
|
||||
|
||||
Future<void> setProjectUUID(String newUUID) async {
|
||||
await storage.write(key: projectKey, value: newUUID);
|
||||
emit(newUUID);
|
||||
}
|
||||
|
||||
Future<void> clearProjectUUID() async {
|
||||
await storage.delete(key: projectKey);
|
||||
emit(null);
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user