26 lines
703 B
Dart
26 lines
703 B
Dart
import 'package:flutter/material.dart';
|
|
|
|
import 'package:pweb/generated/i18n/app_localizations.dart';
|
|
|
|
|
|
Future<bool> showDeleteConfirmationDialog(BuildContext context) async {
|
|
final l10n = AppLocalizations.of(context)!;
|
|
return await showDialog<bool>(
|
|
context: context,
|
|
builder: (_) => AlertDialog(
|
|
title: Text(l10n.delete),
|
|
content: Text(l10n.deletePaymentConfirmation),
|
|
actions: [
|
|
TextButton(
|
|
onPressed: () => Navigator.of(context).pop(false),
|
|
child: Text(l10n.cancel),
|
|
),
|
|
ElevatedButton(
|
|
onPressed: () => Navigator.of(context).pop(true),
|
|
child: Text(l10n.delete),
|
|
),
|
|
],
|
|
),
|
|
) ?? false;
|
|
}
|