mirror of
https://github.com/SyncrowIOT/web.git
synced 2025-07-10 07:07:19 +00:00
privacy policy fixes
This commit is contained in:
@ -1,3 +1,4 @@
|
||||
import 'package:flutter/widgets.dart';
|
||||
import 'package:flutter_bloc/flutter_bloc.dart';
|
||||
import 'package:flutter_secure_storage/flutter_secure_storage.dart';
|
||||
import 'package:go_router/go_router.dart';
|
||||
@ -51,6 +52,8 @@ class HomeBloc extends Bloc<HomeEvent, HomeState> {
|
||||
await const FlutterSecureStorage().read(key: UserModel.userUuidKey);
|
||||
user = await HomeApi().fetchUserInfo(uuid);
|
||||
add(FetchTermEvent());
|
||||
add(FetchPolicyEvent());
|
||||
|
||||
emit(HomeInitial());
|
||||
} catch (e) {
|
||||
return;
|
||||
@ -61,7 +64,8 @@ class HomeBloc extends Bloc<HomeEvent, HomeState> {
|
||||
try {
|
||||
emit(LoadingHome());
|
||||
terms = await HomeApi().fetchTerms();
|
||||
add(FetchPolicyEvent());
|
||||
emit(HomeInitial());
|
||||
|
||||
// emit(PolicyAgreement());
|
||||
} catch (e) {
|
||||
return;
|
||||
@ -72,8 +76,11 @@ class HomeBloc extends Bloc<HomeEvent, HomeState> {
|
||||
try {
|
||||
emit(LoadingHome());
|
||||
policy = await HomeApi().fetchPolicy();
|
||||
// emit(PolicyAgreement());
|
||||
debugPrint("Fetched policy: $policy");
|
||||
// Emit a state to trigger the UI update
|
||||
emit(HomeInitial());
|
||||
} catch (e) {
|
||||
debugPrint("Error fetching policy: $e");
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user