Sincronização de modulos em Usuário com somente um local vinculado
This commit is contained in:
parent
b0f040fd53
commit
5bc47b9067
|
@ -16,6 +16,12 @@ class HomeBloc extends Bloc<HomeEvent, HomeState> {
|
|||
});
|
||||
}
|
||||
|
||||
@override
|
||||
Future<void> close() {
|
||||
_completer.cancel();
|
||||
return super.close();
|
||||
}
|
||||
|
||||
Future<void> _onHomeEvent(HomeEvent event, Emitter<HomeState> emit) async {
|
||||
final devUUID =
|
||||
(await StorageHelper().get(ProfileStorageKey.devUUID.key)) ?? '';
|
||||
|
|
|
@ -1,12 +1,10 @@
|
|||
import 'dart:async';
|
||||
import 'dart:developer';
|
||||
|
||||
import 'package:flutter_bloc/flutter_bloc.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_bloc/flutter_bloc.dart';
|
||||
import 'package:hub/features/local/index.dart';
|
||||
import 'package:hub/features/storage/index.dart';
|
||||
import 'package:hub/flutter_flow/flutter_flow_model.dart';
|
||||
import 'package:hub/flutter_flow/nav/nav.dart';
|
||||
import 'package:hub/features/local/index.dart';
|
||||
|
||||
class LocalProfileEvent {}
|
||||
|
||||
|
@ -38,6 +36,12 @@ class LocalProfileBloc extends Bloc<LocalProfileEvent, LocalProfileState> {
|
|||
});
|
||||
}
|
||||
|
||||
@override
|
||||
Future<void> close() {
|
||||
_completer.cancel();
|
||||
return super.close();
|
||||
}
|
||||
|
||||
Future<void> _onLocalProfileEvent(
|
||||
LocalProfileEvent event, Emitter<LocalProfileState> emit) async {
|
||||
final cliName =
|
||||
|
|
|
@ -2,10 +2,10 @@ import 'dart:developer';
|
|||
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:hub/features/backend/index.dart';
|
||||
import 'package:hub/features/local/index.dart';
|
||||
import 'package:hub/features/module/data/repositories/license_repository_impl.dart';
|
||||
import 'package:hub/features/storage/index.dart';
|
||||
import 'package:hub/flutter_flow/internationalization.dart';
|
||||
import 'package:hub/features/local/index.dart';
|
||||
|
||||
import 'package:hub/shared/utils/dialog_util.dart';
|
||||
import 'package:hub/shared/utils/log_util.dart';
|
||||
|
||||
|
@ -86,7 +86,12 @@ class LocalUtil {
|
|||
.set(ProfileStorageKey.ownerName.key, local['CLU_OWNER_DSC']);
|
||||
await StorageHelper()
|
||||
.set(ProfileStorageKey.userName.key, local['USU_NOME']);
|
||||
return await LocalsRemoteDataSourceImpl().processProperty(context);
|
||||
return await LocalsRemoteDataSourceImpl()
|
||||
.processProperty(context)
|
||||
.then((v) async {
|
||||
if (v == true) return await LicenseRepositoryImpl().updateLicense();
|
||||
return v;
|
||||
});
|
||||
}
|
||||
|
||||
static void logLocalsStatus(List<dynamic> locals) {
|
||||
|
|
Loading…
Reference in New Issue