In flutter app I have impalement one native screen using platform channel. After that I want to back in flutter and open new flutter screen but I can't open the screen.
I follow below step: 1)From flutter I call Native screen by method Channel. 2)After that from native I call flutter by method channel, but in this process I get the data from native but another screen is not open.
I have implement like this:
Future<dynamic> searchCallHandler(MethodCall call) async {
switch (call.method) {
case 'openSearch':
print('call callMe : arguments = ${call.arguments}');
navigatorKey.currentState.push(
MaterialPageRoute(builder: (context) => SearchLocation()),
);
return Future.value('called from platform!');
default:
print('Unknowm method ${call.method}');
throw MissingPluginException();
break;
}
}
in above code get the arguments value but not go in the SearchLocation Screen of the flutter.