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 'getPlatformVersion':
return getPlatformVersion();
case 'initializeSDK':
return await initializeSDK(call.arguments);
case 'processPayment':
return await processPayment(call.arguments);
case 'getSDKVersion':
return getSDKVersion();
default:
throw PlatformException(
code: 'Unimplemented',
details:
'amwal_pay_sdk for web doesn\'t implement \'${call.method}\'',
);
}
}