implemented a guided notification permission flow triggered on the first Talk visit
This commit is contained in:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user