getListPaymentMethod method
Future<void>
getListPaymentMethod(
{ - required dynamic onSuccess(
- Map<String, dynamic>
),
- required dynamic onError(
- String
),
})
Implementation
Future<void> getListPaymentMethod({
required Function(Map<String, dynamic>) onSuccess,
required Function(String) onError,
}) async {
try {
final result = await _invokeMethod('getListPaymentMethod');
if (result is Map) {
onSuccess(Map<String, dynamic>.from(result));
} else {
onError('Invalid data format');
}
} catch (e) {
onError('Error fetching payment methods: $e');
}
}