push search, space color selection, global user access fixes

This commit is contained in:
ashrafzarkanisala
2024-09-05 00:43:57 +03:00
parent c9160debd3
commit 74dccbf899
12 changed files with 203 additions and 192 deletions

View File

@ -16,7 +16,7 @@ class HomeBloc extends Bloc<HomeEvent, HomeState> {
final BuchheimWalkerConfiguration builder = BuchheimWalkerConfiguration();
List<Node> sourcesList = [];
List<Node> destinationsList = [];
static UserModel? user;
UserModel? user;
HomeBloc() : super((HomeInitial())) {
on<CreateNewNode>(_createNode);
@ -50,15 +50,15 @@ class HomeBloc extends Bloc<HomeEvent, HomeState> {
}
}
static Future fetchUserInfo() async {
try {
var uuid =
await const FlutterSecureStorage().read(key: UserModel.userUuidKey);
user = await HomeApi().fetchUserInfo(uuid);
} catch (e) {
return;
}
}
// static Future fetchUserInfo() async {
// try {
// var uuid =
// await const FlutterSecureStorage().read(key: UserModel.userUuidKey);
// user = await HomeApi().fetchUserInfo(uuid);
// } catch (e) {
// return;
// }
// }
List<HomeItemModel> homeItems = [
HomeItemModel(