handleMethodCall method
Handles method calls over the MethodChannel of this plugin. Note: Check the "federated" architecture for a new way of doing this: https://flutter.dev/go/federated-plugins
Implementation
Future<dynamic> handleMethodCall(MethodCall call) async {
switch (call.method) {
case 'doPayment':
var arguments = call.arguments as LinkedHashMap<Object?, Object?>;
Map<String, dynamic> mapData = {};
arguments.forEach((key, value) {
mapData[key as String] = value;
});
return doPayment(mapData);
default:
throw PlatformException(
code: 'Unimplemented',
details: 'cashfree_pg for web doesn\'t implement \'${call.method}\'',
);
}
}