recipient saving

This commit is contained in:
Stephan D
2025-12-05 04:34:11 +01:00
parent 85fb567ed9
commit e1da16448b
17 changed files with 121 additions and 40 deletions

View File

@@ -1,6 +1,7 @@
import 'dart:async';
import 'package:flutter/material.dart';
import 'package:pshared/utils/snackbar.dart';
import 'package:pweb/utils/error/handler.dart';
import 'package:pweb/widgets/error/content.dart';
@@ -52,13 +53,18 @@ Future<T?> executeActionWithNotification<T>({
required BuildContext context,
required Future<T> Function() action,
required String errorMessage,
String? successMessage,
int delaySeconds = 3,
}) async {
final scaffoldMessenger = ScaffoldMessenger.of(context);
final localizations = AppLocalizations.of(context)!;
try {
return await action();
final result = await action();
if (successMessage != null) {
notifyUser(context, successMessage, delaySeconds: delaySeconds);
}
return result;
} catch (e) {
// Report the error using your existing notifier.
notifyUserOfErrorX(

View File

@@ -1,12 +1,13 @@
import 'package:flutter/material.dart';
import 'package:pshared/models/payment/methods/data.dart';
import 'package:pshared/models/payment/type.dart';
import 'package:pweb/utils/payment/label.dart';
class PaymentTypeSelector extends StatelessWidget {
final Map<PaymentType, Object> availableTypes;
final MethodMap availableTypes;
final PaymentType selectedType;
final ValueChanged<PaymentType> onSelected;