mirror of
https://git.selfprivacy.org/kherel/selfprivacy.org.app.git
synced 2025-01-27 11:16:45 +00:00
Fix ProviderVolume cubit exception
This commit is contained in:
parent
440151d0f5
commit
b48017508a
|
@ -12,20 +12,19 @@ part 'provider_volume_state.dart';
|
||||||
class ApiProviderVolumeCubit
|
class ApiProviderVolumeCubit
|
||||||
extends ServerInstallationDependendCubit<ApiProviderVolumeState> {
|
extends ServerInstallationDependendCubit<ApiProviderVolumeState> {
|
||||||
ApiProviderVolumeCubit(final ServerInstallationCubit serverInstallationCubit)
|
ApiProviderVolumeCubit(final ServerInstallationCubit serverInstallationCubit)
|
||||||
: super(serverInstallationCubit, const ApiProviderVolumeState.initial()) {
|
: super(serverInstallationCubit, const ApiProviderVolumeState.initial());
|
||||||
final serverDetails = getIt<ApiConfigModel>().serverDetails;
|
|
||||||
providerApi = serverDetails == null
|
|
||||||
? null
|
|
||||||
: VolumeApiFactoryCreator.createVolumeProviderApiFactory(
|
|
||||||
getIt<ApiConfigModel>().serverDetails!.provider,
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
VolumeProviderApiFactory? providerApi;
|
VolumeProviderApiFactory? providerApi;
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Future<void> load() async {
|
Future<void> load() async {
|
||||||
if (serverInstallationCubit.state is ServerInstallationFinished) {
|
if (serverInstallationCubit.state is ServerInstallationFinished) {
|
||||||
|
final serverDetails = getIt<ApiConfigModel>().serverDetails;
|
||||||
|
providerApi = serverDetails == null
|
||||||
|
? null
|
||||||
|
: VolumeApiFactoryCreator.createVolumeProviderApiFactory(
|
||||||
|
getIt<ApiConfigModel>().serverDetails!.provider,
|
||||||
|
);
|
||||||
_refetch();
|
_refetch();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue