Skip to content

Commit

Permalink
use showModalDialog to mark add snapshot dialog as uninterruptible
Browse files Browse the repository at this point in the history
  • Loading branch information
kunstmusik committed Sep 26, 2023
1 parent e0301fa commit d94ce5b
Showing 1 changed file with 19 additions and 16 deletions.
35 changes: 19 additions & 16 deletions lib/components/create_snapshot_dialog.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand All @@ -21,22 +22,24 @@ Future<void> promptToCreateSnapshot(
BuildContext context,
Drive drive,
) async {
return showAnimatedDialog(
context,
barrierDismissible: false,
content: BlocProvider(
create: (_) => CreateSnapshotCubit(
arweave: context.read<ArweaveService>(),
driveDao: context.read<DriveDao>(),
profileCubit: context.read<ProfileCubit>(),
pst: context.read<PstService>(),
tabVisibility: TabVisibilitySingleton(),
),
child: CreateSnapshotDialog(
drive: drive,
),
),
);
return showModalDialog(
context,
() => showAnimatedDialog(
context,
barrierDismissible: false,
content: BlocProvider(
create: (_) => CreateSnapshotCubit(
arweave: context.read<ArweaveService>(),
driveDao: context.read<DriveDao>(),
profileCubit: context.read<ProfileCubit>(),
pst: context.read<PstService>(),
tabVisibility: TabVisibilitySingleton(),
),
child: CreateSnapshotDialog(
drive: drive,
),
),
));
}

class CreateSnapshotDialog extends StatelessWidget {
Expand Down

0 comments on commit d94ce5b

Please sign in to comment.