pushRouteNameToFramework function
Implementation
Future<ByteData> pushRouteNameToFramework(Object? _, String routeName) {
final Completer<ByteData> completer = Completer<ByteData>();
SystemNavigator.routeInformationUpdated(location: routeName);
final _SendMessage sendMessage = _ambiguate(WidgetsBinding.instance)
?.platformDispatcher
.onPlatformMessage ??
ui.channelBuffers.push;
sendMessage(
'flutter/navigation',
_codec.encodeMethodCall(
MethodCall('pushRouteInformation', <dynamic, dynamic>{
'location': routeName,
'state': null,
}),
),
completer.complete,
);
return completer.future;
}