From d94ce5bf3dde88ae97674c6ae98258f87c923e29 Mon Sep 17 00:00:00 2001 From: Steven Yi Date: Tue, 26 Sep 2023 16:56:15 -0400 Subject: [PATCH] use showModalDialog to mark add snapshot dialog as uninterruptible --- lib/components/create_snapshot_dialog.dart | 35 ++++++++++++---------- 1 file changed, 19 insertions(+), 16 deletions(-) diff --git a/lib/components/create_snapshot_dialog.dart b/lib/components/create_snapshot_dialog.dart index 50f6d18d72..ad52407abc 100644 --- a/lib/components/create_snapshot_dialog.dart +++ b/lib/components/create_snapshot_dialog.dart @@ -3,6 +3,7 @@ import 'package:ardrive/blocs/profile/profile_cubit.dart'; import 'package:ardrive/components/components.dart'; import 'package:ardrive/entities/string_types.dart'; import 'package:ardrive/models/models.dart'; +import 'package:ardrive/pages/user_interaction_wrapper.dart'; import 'package:ardrive/services/arweave/arweave.dart'; import 'package:ardrive/services/pst/pst.dart'; import 'package:ardrive/theme/theme.dart'; @@ -21,22 +22,24 @@ Future promptToCreateSnapshot( BuildContext context, Drive drive, ) async { - return showAnimatedDialog( - context, - barrierDismissible: false, - content: BlocProvider( - create: (_) => CreateSnapshotCubit( - arweave: context.read(), - driveDao: context.read(), - profileCubit: context.read(), - pst: context.read(), - tabVisibility: TabVisibilitySingleton(), - ), - child: CreateSnapshotDialog( - drive: drive, - ), - ), - ); + return showModalDialog( + context, + () => showAnimatedDialog( + context, + barrierDismissible: false, + content: BlocProvider( + create: (_) => CreateSnapshotCubit( + arweave: context.read(), + driveDao: context.read(), + profileCubit: context.read(), + pst: context.read(), + tabVisibility: TabVisibilitySingleton(), + ), + child: CreateSnapshotDialog( + drive: drive, + ), + ), + )); } class CreateSnapshotDialog extends StatelessWidget {