implemented a guided notification permission flow triggered on the first Talk visit

This commit is contained in:
2026-07-06 20:01:45 +02:00
parent 3be0113f93
commit 38a271929c
11 changed files with 211 additions and 30 deletions
+9 -5
View File
@@ -9,7 +9,10 @@ class ConfirmDialog extends StatelessWidget {
final String content;
final IconData? icon;
final String confirmButton;
final String cancelButton;
/// Label of the cancel button. Set to `null` for a single-button dialog
/// (only the confirm action is rendered).
final String? cancelButton;
final void Function()? onConfirm;
final AsyncActionCallback? onConfirmAsync;
final AsyncErrorBuilder? errorBuilder;
@@ -48,10 +51,11 @@ class ConfirmDialog extends StatelessWidget {
),
]
: [
TextButton(
onPressed: () => Navigator.of(context).pop(),
child: Text(cancelButton),
),
if (cancelButton != null)
TextButton(
onPressed: () => Navigator.of(context).pop(),
child: Text(cancelButton!),
),
TextButton(
onPressed: () {
Haptics.confirm();