onWidgetChangePaymentJS method
Future<void>
onWidgetChangePaymentJS(
- JavaScriptMessage message
)
Implementation
Future<void> onWidgetChangePaymentJS(JavaScriptMessage message) async {
// print("onWidgetChangePaymentJS : ${message.message}");
try {
Map<String, dynamic> data = jsonDecode(message.message);
WidgetData widgetData = WidgetData.fromJson(data);
if (this.widget.onWidgetChangePayment != null) this.widget.onWidgetChangePayment!(widgetData);
} catch (e) {
print("Error parsing JSON: $e");
}
}