diff --git a/lib/logic/cubit/forms/setup/initializing/backblaze_form_cubit.dart b/lib/logic/cubit/forms/setup/initializing/backblaze_form_cubit.dart index 534c9c79..cbd96318 100644 --- a/lib/logic/cubit/forms/setup/initializing/backblaze_form_cubit.dart +++ b/lib/logic/cubit/forms/setup/initializing/backblaze_form_cubit.dart @@ -2,12 +2,11 @@ import 'dart:async'; import 'package:cubit_form/cubit_form.dart'; import 'package:selfprivacy/config/get_it_config.dart'; import 'package:selfprivacy/logic/api_maps/rest_maps/backblaze.dart'; -import 'package:selfprivacy/logic/cubit/backups/backups_cubit.dart'; import 'package:selfprivacy/logic/models/hive/backups_credential.dart'; import 'package:easy_localization/easy_localization.dart'; class BackblazeFormCubit extends FormCubit { - BackblazeFormCubit(this.backupsCubit) { + BackblazeFormCubit(this.onSubmitCallback) { keyId = FieldCubit( initalValue: '', validations: [ @@ -27,17 +26,17 @@ class BackblazeFormCubit extends FormCubit { @override FutureOr onSubmit() async { - await backupsCubit.setBackupsKey( + await onSubmitCallback( keyId.state.value, applicationKey.state.value, ); } - final BackupsCubit backupsCubit; - late final FieldCubit keyId; late final FieldCubit applicationKey; + final Function(String keyId, String applicationKey) onSubmitCallback; + @override FutureOr asyncValidation() async { late GenericResult backblazeResponse;