process method
Process BBPS action
Implementation
@override
Future<dynamic> process(String action, {Map<String, dynamic>? params}) async {
final result = await methodChannel.invokeMethod<dynamic>('process', {
'action': action,
'params': params ?? {},
});
// Try to parse result as JSON if it's a string
if (result is String) {
try {
return jsonDecode(result);
} catch (_) {
return result;
}
}
return result;
}