Navigator change backup (#38494)
* Broadcasting popRoute and pushRoute methods via SystemChannels.navigation. These messages will be used in flutter_web to detect the route * Broadcasting popRoute and pushRoute methods via SystemChannels.navigation. These messages will be used in flutter_web to detect the route * Reverting all unrelated formatting changes. * Adding unit tests. Adding more comments. * Changing string method names with constant strings. * Fixing a constant strings. * Fixing analyzer error. * Fixing more white space. * Changing the method names. Adding comments to the SystemChannels * Comment and code name fixes * replacing the comment with reviewer suggestion. * addinf systemchannels.navigation mock to test bindings * Adding a new class for sending route change notrifications. The nottifications are only sent on web. This should fix breaking android/ios * using new class RouteNotificationMessages in navigator * Fixing analyzer issues. * fixing cycle dependency * fixing github analyze error * dartfmt two new classes. trying to fix anayze errors * Update route_notification_messages.dart * trying to fix white space errors
This commit is contained in:
@@ -808,6 +808,10 @@ class AutomatedTestWidgetsFlutterBinding extends TestWidgetsFlutterBinding {
|
||||
final String assetFolderPath = Platform.environment['UNIT_TEST_ASSETS'];
|
||||
final String prefix = 'packages/${Platform.environment['APP_NAME']}/';
|
||||
|
||||
/// Navigation related actions (pop, push, replace) broadcasts these actions via
|
||||
/// platform messages.
|
||||
SystemChannels.navigation.setMockMethodCallHandler((MethodCall methodCall) async {});
|
||||
|
||||
defaultBinaryMessenger.setMockMessageHandler('flutter/assets', (ByteData message) {
|
||||
String key = utf8.decode(message.buffer.asUint8List());
|
||||
File asset = File(path.join(assetFolderPath, key));
|
||||
|
||||
Reference in New Issue
Block a user