MethodChannelFlutternative constructor
MethodChannelFlutternative()
Implementation
MethodChannelFlutternative() {
methodChannel.setMethodCallHandler((MethodCall methodCall) async {
var arguments = methodCall.arguments;
var command = CommandFactory.createCommand(methodCall.method);
if (command != null) {
var testValue = await command.execute(
arguments,
InMemoryCache().getElementMap(),
);
return testValue;
} else {
return "Unknown method: ${methodCall.method}";
}
});
}