Skip to content

Commit c579a4a

Browse files
authored
feat(cat-voices): show snackbar at the same level of share dialog (#2658)
* feat: show snackbar at the same level of dialog * fix: remove builder --------- Co-authored-by: Ryszard Schossler <--global>
1 parent d1786de commit c579a4a

File tree

2 files changed

+11
-5
lines changed

2 files changed

+11
-5
lines changed

catalyst_voices/apps/voices/lib/widgets/modals/proposals/share_proposal_dialog.dart

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,16 @@ class ShareProposalDialog extends StatelessWidget {
1313

1414
@override
1515
Widget build(BuildContext context) {
16-
return VoicesShareDialog(
17-
key: const Key('ShareProposalDialog'),
18-
shareItemType: context.l10n.proposal,
19-
shareUrl: shareUrl,
20-
shareMessage: context.l10n.proposalShareMessage,
16+
return ScaffoldMessenger(
17+
child: Scaffold(
18+
backgroundColor: Colors.transparent,
19+
body: VoicesShareDialog(
20+
key: const Key('ShareProposalDialog'),
21+
shareItemType: context.l10n.proposal,
22+
shareUrl: shareUrl,
23+
shareMessage: context.l10n.proposalShareMessage,
24+
),
25+
),
2126
);
2227
}
2328

catalyst_voices/apps/voices/lib/widgets/modals/voices_share_dialog.dart

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -216,6 +216,7 @@ class _ShareItem extends StatelessWidget with LaunchUrlMixin {
216216
void _showSnackbar(BuildContext context) {
217217
VoicesSnackBar(
218218
type: VoicesSnackBarType.success,
219+
behavior: SnackBarBehavior.floating,
219220
title: context.l10n.copied,
220221
message: context.l10n.linkCopiedToClipboard,
221222
duration: const Duration(seconds: 2),

0 commit comments

Comments
 (0)