flutter icon indicating copy to clipboard operation
flutter copied to clipboard

Not able to navigate using tab key when using nested Navigators.

Open MattyBoy4444 opened this issue 3 years ago • 16 comments

b/231967193

Steps to Reproduce

This is the ShellRoute example code from go_router with a couple extra controls to demonstrate the focus issues.

  1. Click in TextField
  2. Press Tab. Focus progresses to 'Button'
  3. Press Tab. Focus progresses to 'View A Details'
  4. Press Tab. Focus does NOT progress to bottomNavigationBar
  5. Press Shift-Tab. Focus does NOT move to the 'Button'

Expected results: ' Focus changes

Actual results: Focus does NOT change

This is using Beta which has the PR https://github.com/flutter/flutter/pull/109702 merged.

Code sample
import 'package:flutter/material.dart';
import 'package:go_router/go_router.dart';

final GlobalKey<NavigatorState> _rootNavigatorKey = GlobalKey<NavigatorState>(debugLabel: 'root');
final GlobalKey<NavigatorState> _shellNavigatorKey = GlobalKey<NavigatorState>(debugLabel: 'shell');

void main() {
  runApp(ShellRouteExampleApp());
}

class ShellRouteExampleApp extends StatelessWidget {
  ShellRouteExampleApp({Key? key}) : super(key: key);

  final GoRouter _router = GoRouter(
    navigatorKey: _rootNavigatorKey,
    initialLocation: '/a',
    routes: <RouteBase>[
      ShellRoute(
        navigatorKey: _shellNavigatorKey,
        builder: (BuildContext context, GoRouterState state, Widget child) {
          return ScaffoldWithNavBar(child: child);
        },
        routes: <RouteBase>[
          GoRoute(
            path: '/a',
            builder: (BuildContext context, GoRouterState state) {
              return const ScreenA();
            },
            routes: <RouteBase>[
              GoRoute(
                path: 'details',
                builder: (BuildContext context, GoRouterState state) {
                  return const DetailsScreen(label: 'A');
                },
              ),
            ],
          ),
          GoRoute(
            path: '/b',
            builder: (BuildContext context, GoRouterState state) {
              return const ScreenB();
            },
            routes: <RouteBase>[
              GoRoute(
                path: 'details',
                parentNavigatorKey: _rootNavigatorKey,
                builder: (BuildContext context, GoRouterState state) {
                  return const DetailsScreen(label: 'B');
                },
              ),
            ],
          ),
        ],
      ),
    ],
  );

  @override
  Widget build(BuildContext context) {
    return MaterialApp.router(
      title: 'Flutter Demo',
      theme: ThemeData(
        primarySwatch: Colors.blue,
      ),
      routeInformationParser: _router.routeInformationParser,
      routerDelegate: _router.routerDelegate,
      routeInformationProvider: _router.routeInformationProvider,
    );
  }
}

class ScaffoldWithNavBar extends StatelessWidget {
  const ScaffoldWithNavBar({
    required this.child,
    Key? key,
  }) : super(key: key);

  final Widget child;

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      body: Column(
        children: [
          Column(
            children: [
              const TextField(),
              TextButton(
                onPressed: () {},
                child: const Text('Button'),
              ),
            ],
          ),
          Expanded(child: child),
        ],
      ),
      bottomNavigationBar: BottomNavigationBar(
        items: const <BottomNavigationBarItem>[
          BottomNavigationBarItem(
            icon: Icon(Icons.home),
            label: 'A Screen',
          ),
          BottomNavigationBarItem(
            icon: Icon(Icons.business),
            label: 'B Screen',
          ),
        ],
        currentIndex: _calculateSelectedIndex(context),
        onTap: (int idx) => _onItemTapped(idx, context),
      ),
    );
  }

  static int _calculateSelectedIndex(BuildContext context) {
    final GoRouter route = GoRouter.of(context);
    final String location = route.location;
    if (location == '/a') {
      return 0;
    }
    if (location == '/b') {
      return 1;
    }
    return 0;
  }

  void _onItemTapped(int index, BuildContext context) {
    switch (index) {
      case 0:
        GoRouter.of(context).go('/a');
        break;
      case 1:
        GoRouter.of(context).go('/b');
        break;
    }
  }
}

class ScreenA extends StatelessWidget {
  const ScreenA({Key? key}) : super(key: key);

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(),
      body: Center(
        child: Column(
          mainAxisSize: MainAxisSize.min,
          children: <Widget>[
            const Text('Screen A'),
            TextButton(
              onPressed: () {
                GoRouter.of(context).go('/a/details');
              },
              child: const Text('View A details'),
            ),
          ],
        ),
      ),
    );
  }
}

class ScreenB extends StatelessWidget {
  const ScreenB({Key? key}) : super(key: key);

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(),
      body: Center(
        child: Column(
          mainAxisSize: MainAxisSize.min,
          children: <Widget>[
            const Text('Screen B'),
            TextButton(
              onPressed: () {
                GoRouter.of(context).go('/b/details');
              },
              child: const Text('View B details'),
            ),
          ],
        ),
      ),
    );
  }
}

class DetailsScreen extends StatelessWidget {
  const DetailsScreen({
    required this.label,
    Key? key,
  }) : super(key: key);

  final String label;

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: const Text('Details Screen'),
      ),
      body: Center(
        child: Text(
          'Details for $label',
          style: Theme.of(context).textTheme.headlineMedium,
        ),
      ),
    );
  }
}

Logs
[  +48 ms] executing: [C:\projects\flutter/] git -c log.showSignature=false log -n 1 --pretty=format:%H
[  +61 ms] Exit code 0 from: git -c log.showSignature=false log -n 1 --pretty=format:%H
[        ] d6260f127fe3f88c98231243b387b48448479bff
[        ] executing: [C:\projects\flutter/] git tag --points-at d6260f127fe3f88c98231243b387b48448479bff
[  +50 ms] Exit code 0 from: git tag --points-at d6260f127fe3f88c98231243b387b48448479bff
[        ] 3.4.0-17.2.pre
[  +36 ms] executing: [C:\projects\flutter/] git rev-parse --abbrev-ref --symbolic @{upstream}
[  +34 ms] Exit code 0 from: git rev-parse --abbrev-ref --symbolic @{upstream}
[        ] origin/beta
[        ] executing: [C:\projects\flutter/] git ls-remote --get-url origin
[  +30 ms] Exit code 0 from: git ls-remote --get-url origin
[        ] https://github.com/flutter/flutter.git
[  +60 ms] executing: [C:\projects\flutter/] git rev-parse --abbrev-ref HEAD
[  +34 ms] Exit code 0 from: git rev-parse --abbrev-ref HEAD
[        ] beta
[  +66 ms] Artifact Instance of 'AndroidGenSnapshotArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'AndroidInternalBuildArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'IOSEngineArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'FlutterWebSdk' is not required, skipping update.
[   +2 ms] Artifact Instance of 'WindowsEngineArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'MacOSEngineArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'LinuxEngineArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'LinuxFuchsiaSDKArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'MacOSFuchsiaSDKArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'FlutterRunnerSDKArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'FlutterRunnerDebugSymbols' is not required, skipping update.
[  +69 ms] Artifact Instance of 'AndroidGenSnapshotArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'AndroidInternalBuildArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'IOSEngineArtifacts' is not required, skipping update.
[   +2 ms] Artifact Instance of 'WindowsEngineArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'MacOSEngineArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'LinuxEngineArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'LinuxFuchsiaSDKArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'MacOSFuchsiaSDKArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'FlutterRunnerSDKArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'FlutterRunnerDebugSymbols' is not required, skipping update.
[  +55 ms] Skipping pub get: version match.
[ +100 ms] Generating C:\Users\matt\Downloads\shellroute_tab\android\app\src\main\java\io\flutter\plugins\GeneratedPluginRegistrant.java
[  +86 ms] Launching lib\main.dart on Chrome in debug mode...
[ +124 ms] Updating assets
[  +54 ms] Waiting for connection from debug service on Chrome...
[ +145 ms] <- reset
[   +4 ms] C:\projects\flutter\bin\cache\dart-sdk\bin\dart.exe --disable-dart-dev
C:\projects\flutter\bin\cache\dart-sdk\bin\snapshots\frontend_server.dart.snapshot --sdk-root
C:\projects\flutter\bin\cache\flutter_web_sdk/ --incremental --target=dartdevc --experimental-emit-debug-metadata
-DFLUTTER_WEB_AUTO_DETECT=true --output-dill C:\Users\matt\AppData\Local\Temp\flutter_tools.ad255e0d\flutter_tool.98263ec6\app.dill       
--libraries-spec file:///C:/projects/flutter/bin/cache/flutter_web_sdk/libraries.json --packages
C:\Users\matt\Downloads\shellroute_tab\.dart_tool\package_config.json -Ddart.vm.profile=false -Ddart.vm.product=false --enable-asserts    
--track-widget-creation --filesystem-root C:\Users\matt\AppData\Local\Temp\flutter_tools.ad255e0d\flutter_tools.2e87c9ca
--filesystem-scheme org-dartlang-app --initialize-from-dill build\b1b715402d823b7fd5c2b68d2edcb2ce.cache.dill.track.dill --platform       
file:///C:/projects/flutter/bin/cache/flutter_web_sdk/kernel/flutter_ddc_sdk_sound.dill --verbosity=error --sound-null-safety
[   +8 ms] <- compile org-dartlang-app:/web_entrypoint.dart
[+12381 ms] Waiting for connection from debug service on Chrome... (completed in 12.5s)
[        ] Synced 31.7MB.
[        ] <- accept
[        ] Caching compiled dill
[ +142 ms] [CHROME]: 
[        ] [CHROME]: DevTools listening on ws://127.0.0.1:58360/devtools/browser/d3457049-4c25-4b2d-9abc-c34fe71dd5ab
[ +588 ms] DwdsInjector: Received request for entrypoint at http://localhost:58339/main_module.bootstrap.js
[   +2 ms] MetadataProvider: Loading debug metadata...
[   +2 ms] MetadataProvider: Loaded debug metadata for module: web_entrypoint.dart
[        ] MetadataProvider: Loaded debug metadata for module: web_plugin_registrant.dart
[        ] MetadataProvider: Loaded debug metadata for module: packages/shellroute_tab/main.dart
[        ] MetadataProvider: Loaded debug metadata for module: packages/go_router/go_router.dart
[        ] MetadataProvider: Loaded debug metadata for module: packages/go_router/src/state.dart
[        ] MetadataProvider: Loaded debug metadata for module: packages/flutter/foundation.dart
[        ] MetadataProvider: Loaded debug metadata for module: packages/flutter/src/foundation/unicode.dart
[        ] MetadataProvider: Loaded debug metadata for module: packages/flutter/src/foundation/synchronous_future.dart
[        ] MetadataProvider: Loaded debug metadata for module: packages/flutter/src/foundation/stack_frame.dart
[        ] MetadataProvider: Loaded debug metadata for module: packages/flutter/src/foundation/object.dart
[        ] MetadataProvider: Loaded debug metadata for module: packages/flutter/src/foundation/constants.dart
[        ] MetadataProvider: Loaded debug metadata for module: packages/meta/meta.dart
[        ] MetadataProvider: Loaded debug metadata for module: packages/meta/meta_meta.dart
[        ] MetadataProvider: Loaded debug metadata for module: packages/flutter/src/foundation/serialization.dart
[        ] MetadataProvider: Loaded debug metadata for module: packages/flutter/src/foundation/print.dart
[        ] MetadataProvider: Loaded debug metadata for module: packages/flutter/src/foundation/_platform_web.dart
[        ] MetadataProvider: Loaded debug metadata for module: packages/flutter/src/foundation/persistent_hash_map.dart
[        ] MetadataProvider: Loaded debug metadata for module: packages/flutter/src/foundation/observer_list.dart
[        ] MetadataProvider: Loaded debug metadata for module: packages/flutter/src/foundation/node.dart
[        ] MetadataProvider: Loaded debug metadata for module: packages/flutter/src/foundation/math.dart
[        ] MetadataProvider: Loaded debug metadata for module: packages/flutter/src/foundation/licenses.dart
[        ] MetadataProvider: Loaded debug metadata for module: packages/flutter/src/foundation/key.dart
[        ] MetadataProvider: Loaded debug metadata for module: packages/flutter/src/foundation/debug.dart
[        ] MetadataProvider: Loaded debug metadata for module: packages/flutter/src/foundation/basic_types.dart
[        ] MetadataProvider: Loaded debug metadata for module: packages/flutter/src/foundation/_isolates_web.dart
[        ] MetadataProvider: Loaded debug metadata for module: packages/flutter/src/foundation/consolidate_response.dart
[        ] MetadataProvider: Loaded debug metadata for module: packages/flutter/src/foundation/collections.dart
[        ] MetadataProvider: Loaded debug metadata for module: packages/flutter/src/foundation/change_notifier.dart
[        ] MetadataProvider: Loaded debug metadata for module: packages/flutter/src/foundation/_bitfield_web.dart
[        ] MetadataProvider: Loaded debug metadata for module: packages/flutter/src/foundation/binding.dart
[        ] MetadataProvider: Loaded debug metadata for module: packages/flutter/src/foundation/annotations.dart
[        ] MetadataProvider: Loaded debug metadata for module: packages/go_router/src/path_utils.dart
[        ] MetadataProvider: Loaded debug metadata for module: packages/go_router/src/pages/custom_transition_page.dart
[        ] MetadataProvider: Loaded debug metadata for module: packages/flutter/widgets.dart
[        ] MetadataProvider: Loaded debug metadata for module: packages/flutter/src/widgets/will_pop_scope.dart
[        ] MetadataProvider: Loaded debug metadata for module: packages/flutter/src/widgets/title.dart
[        ] MetadataProvider: Loaded debug metadata for module: packages/flutter/rendering.dart
[        ] MetadataProvider: Loaded debug metadata for module: packages/flutter/src/rendering/wrap.dart
[        ] MetadataProvider: Loaded debug metadata for module: packages/flutter/src/rendering/layer.dart
[        ] MetadataProvider: Loaded debug metadata for module: packages/flutter/painting.dart
[        ] MetadataProvider: Loaded debug metadata for module: packages/flutter/src/painting/placeholder_span.dart
[        ] MetadataProvider: Loaded debug metadata for module: packages/flutter/services.dart
[        ] MetadataProvider: Loaded debug metadata for module: packages/flutter/src/services/text_layout_metrics.dart
[        ] MetadataProvider: Loaded debug metadata for module: packages/flutter/src/services/text_editing.dart
[        ] MetadataProvider: Loaded debug metadata for module: packages/flutter/src/services/text_editing_delta.dart
[   +1 ms] MetadataProvider: Loaded debug metadata for module: packages/vector_math/vector_math_64.dart
[        ] MetadataProvider: Loaded debug metadata for module: packages/flutter/src/services/binary_messenger.dart
[        ] MetadataProvider: Loaded debug metadata for module: packages/flutter/src/services/keyboard_key.g.dart
[        ] MetadataProvider: Loaded debug metadata for module: packages/flutter/src/services/keyboard_maps.g.dart
[        ] MetadataProvider: Loaded debug metadata for module: packages/flutter/scheduler.dart
[        ] MetadataProvider: Loaded debug metadata for module: packages/flutter/src/scheduler/ticker.dart
[        ] MetadataProvider: Loaded debug metadata for module: packages/flutter/src/scheduler/binding.dart
[        ] MetadataProvider: Loaded debug metadata for module: packages/flutter/src/scheduler/priority.dart
[        ] MetadataProvider: Loaded debug metadata for module: packages/flutter/src/scheduler/debug.dart
[        ] MetadataProvider: Loaded debug metadata for module: packages/collection/src/union_set_controller.dart
[        ] MetadataProvider: Loaded debug metadata for module: packages/collection/src/queue_list.dart
[        ] MetadataProvider: Loaded debug metadata for module: packages/collection/src/priority_queue.dart
[        ] MetadataProvider: Loaded debug metadata for module: packages/collection/src/utils.dart
[        ] MetadataProvider: Loaded debug metadata for module: packages/collection/src/list_extensions.dart
[        ] MetadataProvider: Loaded debug metadata for module: packages/collection/src/equality.dart
[        ] MetadataProvider: Loaded debug metadata for module: packages/collection/src/comparators.dart
[        ] MetadataProvider: Loaded debug metadata for module: packages/collection/src/algorithms.dart
[        ] MetadataProvider: Loaded debug metadata for module: packages/collection/src/iterable_zip.dart
[        ] MetadataProvider: Loaded debug metadata for module: packages/collection/src/iterable_extensions.dart
[        ] MetadataProvider: Loaded debug metadata for module: packages/collection/src/functions.dart
[        ] MetadataProvider: Loaded debug metadata for module: packages/collection/src/combined_wrappers/combined_map.dart
[        ] MetadataProvider: Loaded debug metadata for module: packages/collection/src/combined_wrappers/combined_iterable.dart
[        ] MetadataProvider: Loaded debug metadata for module: packages/collection/src/combined_wrappers/combined_iterator.dart
[        ] MetadataProvider: Loaded debug metadata for module: packages/collection/src/combined_wrappers/combined_list.dart
[        ] MetadataProvider: Loaded debug metadata for module: packages/collection/src/canonicalized_map.dart
[        ] MetadataProvider: Loaded debug metadata for module: packages/flutter/src/services/text_formatter.dart
[        ] MetadataProvider: Loaded debug metadata for module: packages/characters/characters.dart
[        ] MetadataProvider: Loaded debug metadata for module: packages/characters/src/extensions.dart
[        ] MetadataProvider: Loaded debug metadata for module: packages/characters/src/characters_impl.dart
[        ] MetadataProvider: Loaded debug metadata for module: packages/characters/src/grapheme_clusters/breaks.dart
[        ] MetadataProvider: Loaded debug metadata for module: packages/characters/src/grapheme_clusters/table.dart
[        ] MetadataProvider: Loaded debug metadata for module: packages/characters/src/grapheme_clusters/constants.dart
[        ] MetadataProvider: Loaded debug metadata for module: packages/flutter/src/services/system_sound.dart
[        ] MetadataProvider: Loaded debug metadata for module: packages/flutter/src/services/system_navigator.dart
[        ] MetadataProvider: Loaded debug metadata for module: packages/flutter/src/services/system_chrome.dart
[        ] MetadataProvider: Loaded debug metadata for module: packages/flutter/src/services/spell_check.dart
[        ] MetadataProvider: Loaded debug metadata for module: packages/flutter/src/services/platform_views.dart
[        ] MetadataProvider: Loaded debug metadata for module: packages/flutter/gestures.dart
[        ] MetadataProvider: Loaded debug metadata for module: packages/flutter/src/gestures/velocity_tracker.dart
[        ] MetadataProvider: Loaded debug metadata for module: packages/flutter/src/gestures/lsq_solver.dart
[        ] MetadataProvider: Loaded debug metadata for module: packages/flutter/src/gestures/events.dart
[        ] MetadataProvider: Loaded debug metadata for module: packages/flutter/src/gestures/gesture_settings.dart
[        ] MetadataProvider: Loaded debug metadata for module: packages/flutter/src/gestures/constants.dart
[        ] MetadataProvider: Loaded debug metadata for module: packages/flutter/src/gestures/team.dart
[        ] MetadataProvider: Loaded debug metadata for module: packages/flutter/src/gestures/arena.dart
[        ] MetadataProvider: Loaded debug metadata for module: packages/flutter/src/gestures/debug.dart
[        ] MetadataProvider: Loaded debug metadata for module: packages/flutter/src/gestures/binding.dart
[        ] MetadataProvider: Loaded debug metadata for module: packages/flutter/src/gestures/pointer_signal_resolver.dart
[        ] MetadataProvider: Loaded debug metadata for module: packages/flutter/src/gestures/pointer_router.dart
[        ] MetadataProvider: Loaded debug metadata for module: packages/flutter/src/gestures/hit_test.dart
[        ] MetadataProvider: Loaded debug metadata for module: packages/flutter/src/gestures/resampler.dart
[        ] MetadataProvider: Loaded debug metadata for module: packages/flutter/src/gestures/converter.dart
[        ] MetadataProvider: Loaded debug metadata for module: packages/flutter/src/gestures/tap.dart
[        ] MetadataProvider: Loaded debug metadata for module: packages/flutter/src/gestures/recognizer.dart
[        ] MetadataProvider: Loaded debug metadata for module: packages/flutter/src/gestures/scale.dart
[        ] MetadataProvider: Loaded debug metadata for module: packages/flutter/src/gestures/multitap.dart
[        ] MetadataProvider: Loaded debug metadata for module: packages/flutter/src/gestures/multidrag.dart
[        ] MetadataProvider: Loaded debug metadata for module: packages/flutter/src/gestures/drag.dart
[        ] MetadataProvider: Loaded debug metadata for module: packages/flutter/src/gestures/drag_details.dart
[        ] MetadataProvider: Loaded debug metadata for module: packages/flutter/src/gestures/monodrag.dart
[        ] MetadataProvider: Loaded debug metadata for module: packages/flutter/src/gestures/long_press.dart
[        ] MetadataProvider: Loaded debug metadata for module: packages/flutter/src/gestures/force_press.dart
[        ] MetadataProvider: Loaded debug metadata for module: packages/flutter/src/gestures/eager.dart
[        ] MetadataProvider: Loaded debug metadata for module: packages/flutter/src/services/mouse_tracking.dart
[        ] MetadataProvider: Loaded debug metadata for module: packages/flutter/src/services/mouse_cursor.dart
[        ] MetadataProvider: Loaded debug metadata for module: packages/flutter/src/services/haptic_feedback.dart
[        ] MetadataProvider: Loaded debug metadata for module: packages/flutter/src/services/font_loader.dart
[        ] MetadataProvider: Loaded debug metadata for module: packages/flutter/src/services/deferred_component.dart
[        ] MetadataProvider: Loaded debug metadata for module: packages/flutter/src/painting/basic_types.dart
[        ] MetadataProvider: Loaded debug metadata for module: packages/flutter/src/painting/colors.dart
[        ] MetadataProvider: Loaded debug metadata for module: packages/flutter/src/painting/star_border.dart
[        ] MetadataProvider: Loaded debug metadata for module: packages/flutter/src/painting/stadium_border.dart
[        ] MetadataProvider: Loaded debug metadata for module: packages/flutter/src/painting/rounded_rectangle_border.dart
[        ] MetadataProvider: Loaded debug metadata for module: packages/flutter/src/painting/circle_border.dart
[        ] MetadataProvider: Loaded debug metadata for module: packages/flutter/src/painting/borders.dart
[        ] MetadataProvider: Loaded debug metadata for module: packages/flutter/src/painting/edge_insets.dart
[        ] MetadataProvider: Loaded debug metadata for module: packages/flutter/src/painting/border_radius.dart
[        ] MetadataProvider: Loaded debug metadata for module: packages/flutter/src/painting/shape_decoration.dart
[        ] MetadataProvider: Loaded debug metadata for module: packages/flutter/src/painting/_network_image_web.dart
[        ] MetadataProvider: Loaded debug metadata for module: packages/flutter/src/painting/image_stream.dart
[        ] MetadataProvider: Loaded debug metadata for module: packages/flutter/src/painting/image_cache.dart
[        ] MetadataProvider: Loaded debug metadata for module: packages/flutter/src/painting/binding.dart
[        ] MetadataProvider: Loaded debug metadata for module: packages/flutter/src/painting/shader_warm_up.dart
[        ] MetadataProvider: Loaded debug metadata for module: packages/flutter/src/painting/debug.dart
[        ] MetadataProvider: Loaded debug metadata for module: packages/flutter/src/painting/gradient.dart
[        ] MetadataProvider: Loaded debug metadata for module: packages/flutter/src/painting/alignment.dart
[        ] MetadataProvider: Loaded debug metadata for module: packages/flutter/src/painting/decoration_image.dart
[        ] MetadataProvider: Loaded debug metadata for module: packages/flutter/src/painting/box_fit.dart
[        ] MetadataProvider: Loaded debug metadata for module: packages/flutter/src/painting/decoration.dart
[        ] MetadataProvider: Loaded debug metadata for module: packages/flutter/src/painting/box_shadow.dart
[        ] MetadataProvider: Loaded debug metadata for module: packages/flutter/src/painting/box_decoration.dart
[        ] MetadataProvider: Loaded debug metadata for module: packages/flutter/src/painting/box_border.dart
[        ] MetadataProvider: Loaded debug metadata for module: packages/flutter/src/painting/paint_utilities.dart
[        ] MetadataProvider: Loaded debug metadata for module: packages/flutter/src/painting/oval_border.dart
[        ] MetadataProvider: Loaded debug metadata for module: packages/flutter/src/painting/notched_shapes.dart
[        ] MetadataProvider: Loaded debug metadata for module: packages/flutter/src/painting/matrix_utils.dart
[        ] MetadataProvider: Loaded debug metadata for module: packages/flutter/src/painting/image_resolution.dart
[        ] MetadataProvider: Loaded debug metadata for module: packages/flutter/src/painting/image_decoder.dart
[        ] MetadataProvider: Loaded debug metadata for module: packages/flutter/src/painting/geometry.dart
[        ] MetadataProvider: Loaded debug metadata for module: packages/flutter/src/painting/fractional_offset.dart
[        ] MetadataProvider: Loaded debug metadata for module: packages/flutter/src/painting/flutter_logo.dart
[        ] MetadataProvider: Loaded debug metadata for module: packages/flutter/src/painting/continuous_rectangle_border.dart
[        ] MetadataProvider: Loaded debug metadata for module: packages/flutter/src/painting/clip.dart
[        ] MetadataProvider: Loaded debug metadata for module: packages/flutter/src/painting/beveled_rectangle_border.dart
[        ] MetadataProvider: Loaded debug metadata for module: packages/flutter/semantics.dart
[        ] MetadataProvider: Loaded debug metadata for module: packages/flutter/src/semantics/semantics_service.dart
[        ] MetadataProvider: Loaded debug metadata for module: packages/flutter/src/semantics/semantics_event.dart
[        ] MetadataProvider: Loaded debug metadata for module: packages/flutter/src/semantics/semantics.dart
[        ] MetadataProvider: Loaded debug metadata for module: packages/flutter/src/semantics/binding.dart
[        ] MetadataProvider: Loaded debug metadata for module: packages/flutter/src/semantics/debug.dart
[        ] MetadataProvider: Loaded debug metadata for module: packages/flutter/animation.dart
[        ] MetadataProvider: Loaded debug metadata for module: packages/flutter/src/animation/tween_sequence.dart
[        ] MetadataProvider: Loaded debug metadata for module: packages/flutter/src/animation/listener_helpers.dart
[        ] MetadataProvider: Loaded debug metadata for module: packages/flutter/src/animation/curves.dart
[        ] MetadataProvider: Loaded debug metadata for module: packages/flutter/src/animation/animation_controller.dart
[        ] MetadataProvider: Loaded debug metadata for module: packages/flutter/physics.dart
[        ] MetadataProvider: Loaded debug metadata for module: packages/flutter/src/physics/utils.dart
[        ] MetadataProvider: Loaded debug metadata for module: packages/flutter/src/physics/tolerance.dart
[        ] MetadataProvider: Loaded debug metadata for module: packages/flutter/src/physics/spring_simulation.dart
[        ] MetadataProvider: Loaded debug metadata for module: packages/flutter/src/physics/simulation.dart
[        ] MetadataProvider: Loaded debug metadata for module: packages/flutter/src/physics/gravity_simulation.dart
[        ] MetadataProvider: Loaded debug metadata for module: packages/flutter/src/physics/friction_simulation.dart
[        ] MetadataProvider: Loaded debug metadata for module: packages/flutter/src/physics/clamped_simulation.dart
[        ] MetadataProvider: Loaded debug metadata for module: packages/flutter/src/rendering/layout_helper.dart
[        ] MetadataProvider: Loaded debug metadata for module: packages/flutter/src/rendering/box.dart
[        ] MetadataProvider: Loaded debug metadata for module: packages/flutter/src/rendering/viewport_offset.dart
[        ] MetadataProvider: Loaded debug metadata for module: packages/flutter/src/rendering/sliver.dart
[        ] MetadataProvider: Loaded debug metadata for module: packages/flutter/src/rendering/view.dart
[        ] MetadataProvider: Loaded debug metadata for module: packages/flutter/src/rendering/mouse_tracker.dart
[        ] MetadataProvider: Loaded debug metadata for module: packages/flutter/src/rendering/tweens.dart
[        ] MetadataProvider: Loaded debug metadata for module: packages/flutter/src/rendering/texture.dart
[        ] MetadataProvider: Loaded debug metadata for module: packages/flutter/src/rendering/table_border.dart
[        ] MetadataProvider: Loaded debug metadata for module: packages/flutter/src/rendering/table.dart
[        ] MetadataProvider: Loaded debug metadata for module: packages/flutter/src/rendering/stack.dart
[        ] MetadataProvider: Loaded debug metadata for module: packages/flutter/src/rendering/sliver_persistent_header.dart
[        ] MetadataProvider: Loaded debug metadata for module: packages/flutter/src/rendering/sliver_padding.dart
[        ] MetadataProvider: Loaded debug metadata for module: packages/flutter/src/rendering/sliver_multi_box_adaptor.dart
[        ] MetadataProvider: Loaded debug metadata for module: packages/flutter/src/rendering/sliver_list.dart
[        ] MetadataProvider: Loaded debug metadata for module: packages/flutter/src/rendering/sliver_grid.dart
[        ] MetadataProvider: Loaded debug metadata for module: packages/flutter/src/rendering/sliver_fixed_extent_list.dart
[        ] MetadataProvider: Loaded debug metadata for module: packages/flutter/src/rendering/sliver_fill.dart
[        ] MetadataProvider: Loaded debug metadata for module: packages/flutter/src/rendering/shifted_box.dart
[        ] MetadataProvider: Loaded debug metadata for module: packages/flutter/src/rendering/debug_overflow_indicator.dart
[        ] MetadataProvider: Loaded debug metadata for module: packages/flutter/src/rendering/selection.dart
[        ] MetadataProvider: Loaded debug metadata for module: packages/flutter/src/rendering/rotated_box.dart
[        ] MetadataProvider: Loaded debug metadata for module: packages/flutter/src/rendering/proxy_sliver.dart
[        ] MetadataProvider: Loaded debug metadata for module: packages/flutter/src/rendering/proxy_box.dart
[        ] MetadataProvider: Loaded debug metadata for module: packages/flutter/src/rendering/platform_view.dart
[        ] MetadataProvider: Loaded debug metadata for module: packages/flutter/src/rendering/performance_overlay.dart
[        ] MetadataProvider: Loaded debug metadata for module: packages/flutter/src/rendering/paragraph.dart
[        ] MetadataProvider: Loaded debug metadata for module: packages/flutter/src/rendering/list_wheel_viewport.dart
[        ] MetadataProvider: Loaded debug metadata for module: packages/flutter/src/rendering/list_body.dart
[        ] MetadataProvider: Loaded debug metadata for module: packages/flutter/src/rendering/image.dart
[        ] MetadataProvider: Loaded debug metadata for module: packages/flutter/src/rendering/flow.dart
[        ] MetadataProvider: Loaded debug metadata for module: packages/flutter/src/rendering/flex.dart
[        ] MetadataProvider: Loaded debug metadata for module: packages/flutter/src/rendering/error.dart
[        ] MetadataProvider: Loaded debug metadata for module: packages/flutter/src/rendering/editable.dart
[        ] MetadataProvider: Loaded debug metadata for module: packages/flutter/src/rendering/custom_paint.dart
[        ] MetadataProvider: Loaded debug metadata for module: packages/flutter/src/rendering/custom_layout.dart
[        ] MetadataProvider: Loaded debug metadata for module: packages/flutter/src/rendering/animated_size.dart
[        ] MetadataProvider: Loaded debug metadata for module: packages/flutter/src/widgets/scroll_metrics.dart
[        ] MetadataProvider: Loaded debug metadata for module: packages/flutter/src/widgets/scroll_simulation.dart
[        ] MetadataProvider: Loaded debug metadata for module: packages/flutter/src/widgets/constants.dart
[        ] MetadataProvider: Loaded debug metadata for module: packages/flutter/src/widgets/spell_check.dart
[        ] MetadataProvider: Loaded debug metadata for module: packages/flutter/src/widgets/visibility.dart
[        ] MetadataProvider: Loaded debug metadata for module: packages/flutter/src/widgets/value_listenable_builder.dart
[        ] MetadataProvider: Loaded debug metadata for module: packages/flutter/src/widgets/unique_widget.dart
[        ] MetadataProvider: Loaded debug metadata for module: packages/flutter/src/widgets/tween_animation_builder.dart
[        ] MetadataProvider: Loaded debug metadata for module: packages/flutter/src/widgets/texture.dart
[        ] MetadataProvider: Loaded debug metadata for module: packages/flutter/src/widgets/text_selection_toolbar_layout_delegate.dart   
[        ] MetadataProvider: Loaded debug metadata for module: packages/flutter/src/widgets/status_transitions.dart
[        ] MetadataProvider: Loaded debug metadata for module: packages/flutter/src/widgets/spacer.dart
[        ] MetadataProvider: Loaded debug metadata for module: packages/flutter/src/widgets/snapshot_widget.dart
[        ] MetadataProvider: Loaded debug metadata for module: packages/flutter/src/widgets/slotted_render_object_widget.dart
[        ] MetadataProvider: Loaded debug metadata for module: packages/flutter/src/widgets/sliver_prototype_extent_list.dart
[        ] MetadataProvider: Loaded debug metadata for module: packages/flutter/src/widgets/sliver_persistent_header.dart
[        ] MetadataProvider: Loaded debug metadata for module: packages/flutter/src/widgets/sliver_layout_builder.dart
[        ] MetadataProvider: Loaded debug metadata for module: packages/flutter/src/widgets/layout_builder.dart
[        ] MetadataProvider: Loaded debug metadata for module: packages/flutter/src/widgets/sliver_fill.dart
[        ] MetadataProvider: Loaded debug metadata for module: packages/flutter/src/widgets/size_changed_layout_notifier.dart
[        ] MetadataProvider: Loaded debug metadata for module: packages/flutter/src/widgets/single_child_scroll_view.dart
[        ] MetadataProvider: Loaded debug metadata for module: packages/flutter/src/widgets/scroll_view.dart
[        ] MetadataProvider: Loaded debug metadata for module: packages/flutter/src/widgets/scroll_notification_observer.dart
[        ] MetadataProvider: Loaded debug metadata for module: packages/flutter/src/widgets/safe_area.dart
[        ] MetadataProvider: Loaded debug metadata for module: packages/flutter/src/widgets/reorderable_list.dart
[        ] MetadataProvider: Loaded debug metadata for module: packages/flutter/src/widgets/raw_keyboard_listener.dart
[        ] MetadataProvider: Loaded debug metadata for module: packages/flutter/src/widgets/preferred_size.dart
[        ] MetadataProvider: Loaded debug metadata for module: packages/flutter/src/widgets/page_view.dart
[        ] MetadataProvider: Loaded debug metadata for module: packages/flutter/src/widgets/overflow_bar.dart
[        ] MetadataProvider: Loaded debug metadata for module: packages/flutter/src/widgets/orientation_builder.dart
[        ] MetadataProvider: Loaded debug metadata for module: packages/flutter/src/widgets/nested_scroll_view.dart
[        ] MetadataProvider: Loaded debug metadata for module: packages/flutter/src/widgets/navigation_toolbar.dart
[        ] MetadataProvider: Loaded debug metadata for module: packages/flutter/src/widgets/list_wheel_scroll_view.dart
[        ] MetadataProvider: Loaded debug metadata for module: packages/flutter/src/widgets/keyboard_listener.dart
[        ] MetadataProvider: Loaded debug metadata for module: packages/flutter/src/widgets/interactive_viewer.dart
[        ] MetadataProvider: Loaded debug metadata for module: packages/flutter/src/widgets/image_icon.dart
[        ] MetadataProvider: Loaded debug metadata for module: packages/flutter/src/widgets/icon_theme_data.dart
[        ] MetadataProvider: Loaded debug metadata for module: packages/flutter/src/widgets/icon_theme.dart
[        ] MetadataProvider: Loaded debug metadata for module: packages/flutter/src/widgets/icon.dart
[        ] MetadataProvider: Loaded debug metadata for module: packages/flutter/src/widgets/icon_data.dart
[        ] MetadataProvider: Loaded debug metadata for module: packages/flutter/src/widgets/image_filter.dart
[        ] MetadataProvider: Loaded debug metadata for module: packages/flutter/src/widgets/grid_paper.dart
[        ] MetadataProvider: Loaded debug metadata for module: packages/flutter/src/widgets/form.dart
[        ] MetadataProvider: Loaded debug metadata for module: packages/flutter/src/widgets/fade_in_image.dart
[        ] MetadataProvider: Loaded debug metadata for module: packages/flutter/src/widgets/dual_transition_builder.dart
[        ] MetadataProvider: Loaded debug metadata for module: packages/flutter/src/widgets/draggable_scrollable_sheet.dart
[        ] MetadataProvider: Loaded debug metadata for module: packages/flutter/src/widgets/drag_target.dart
[        ] MetadataProvider: Loaded debug metadata for module: packages/flutter/src/widgets/dismissible.dart
[        ] MetadataProvider: Loaded debug metadata for module:
packages/flutter/src/widgets/desktop_text_selection_toolbar_layout_delegate.dart
[        ] MetadataProvider: Loaded debug metadata for module: packages/flutter/src/widgets/color_filter.dart
[        ] MetadataProvider: Loaded debug metadata for module: packages/flutter/src/widgets/bottom_navigation_bar_item.dart
[        ] MetadataProvider: Loaded debug metadata for module: packages/flutter/src/widgets/autocomplete.dart
[        ] MetadataProvider: Loaded debug metadata for module: packages/flutter/src/widgets/async.dart
[        ] MetadataProvider: Loaded debug metadata for module: packages/flutter/src/widgets/annotated_region.dart
[        ] MetadataProvider: Loaded debug metadata for module: packages/flutter/src/widgets/animated_switcher.dart
[        ] MetadataProvider: Loaded debug metadata for module: packages/flutter/src/widgets/animated_size.dart
[        ] MetadataProvider: Loaded debug metadata for module: packages/flutter/src/widgets/animated_list.dart
[        ] MetadataProvider: Loaded debug metadata for module: packages/flutter/src/widgets/animated_cross_fade.dart
[        ] MetadataProvider: Loaded debug metadata for module: packages/go_router/src/logging.dart
[        ] MetadataProvider: Loaded debug metadata for module: packages/logging/logging.dart
[        ] MetadataProvider: Loaded debug metadata for module: packages/logging/src/logger.dart
[        ] MetadataProvider: Loaded debug metadata for module: packages/logging/src/level.dart
[        ] MetadataProvider: Loaded debug metadata for module: packages/go_router/src/misc/inherited_router.dart
[        ] MetadataProvider: Loaded debug metadata for module: packages/go_router/src/platform.dart
[        ] MetadataProvider: Loaded debug metadata for module: packages/go_router/src/platform/url_path_strategy.dart
[        ] MetadataProvider: Loaded debug metadata for module: packages/go_router/src/platform/path_strategy_web.dart
[        ] MetadataProvider: Loaded debug metadata for module: packages/flutter_web_plugins/flutter_web_plugins.dart
[        ] MetadataProvider: Loaded debug metadata for module: packages/flutter_web_plugins/src/plugin_registry.dart
[        ] MetadataProvider: Loaded debug metadata for module: packages/flutter_web_plugins/src/plugin_event_channel.dart
[        ] MetadataProvider: Loaded debug metadata for module: packages/flutter_web_plugins/src/navigation_common/url_strategy.dart       
[        ] MetadataProvider: Loaded debug metadata for module: packages/flutter_web_plugins/src/navigation/utils.dart
[        ] MetadataProvider: Loaded debug metadata for module: packages/flutter_web_plugins/src/navigation/url_strategy.dart
[        ] MetadataProvider: Loaded debug metadata for module: packages/flutter_web_plugins/src/navigation/js_url_strategy.dart
[        ] MetadataProvider: Loaded debug metadata for module: packages/js/js.dart
[        ] MetadataProvider: Loaded debug metadata for module: packages/go_router/src/parser.dart
[        ] MetadataProvider: Loaded debug metadata for module: packages/go_router/src/redirection.dart
[        ] MetadataProvider: Loaded debug metadata for module: packages/go_router/src/matching.dart
[        ] MetadataProvider: Loaded debug metadata for module: packages/flutter/cupertino.dart
[        ] MetadataProvider: Loaded debug metadata for module: packages/flutter/src/cupertino/thumb_painter.dart
[        ] MetadataProvider: Loaded debug metadata for module: packages/flutter/src/cupertino/text_theme.dart
[        ] MetadataProvider: Loaded debug metadata for module: packages/flutter/src/cupertino/interface_level.dart
[        ] MetadataProvider: Loaded debug metadata for module: packages/flutter/src/cupertino/text_selection_toolbar_button.dart
[        ] MetadataProvider: Loaded debug metadata for module: packages/flutter/src/cupertino/button.dart
[        ] MetadataProvider: Loaded debug metadata for module: packages/flutter/src/cupertino/constants.dart
[        ] MetadataProvider: Loaded debug metadata for module: packages/flutter/src/cupertino/text_selection_toolbar.dart
[        ] MetadataProvider: Loaded debug metadata for module: packages/flutter/src/cupertino/text_selection.dart
[        ] MetadataProvider: Loaded debug metadata for module: packages/flutter/src/cupertino/debug.dart
[        ] MetadataProvider: Loaded debug metadata for module: packages/flutter/src/cupertino/text_form_field_row.dart
[        ] MetadataProvider: Loaded debug metadata for module: packages/flutter/src/cupertino/text_field.dart
[        ] MetadataProvider: Loaded debug metadata for module: packages/flutter/src/cupertino/magnifier.dart
[        ] MetadataProvider: Loaded debug metadata for module: packages/flutter/src/cupertino/icons.dart
[        ] MetadataProvider: Loaded debug metadata for module: packages/flutter/src/cupertino/desktop_text_selection.dart
[        ] MetadataProvider: Loaded debug metadata for module: packages/flutter/src/cupertino/form_row.dart
[        ] MetadataProvider: Loaded debug metadata for module: packages/flutter/src/cupertino/tab_view.dart
[        ] MetadataProvider: Loaded debug metadata for module: packages/flutter/src/cupertino/route.dart
[        ] MetadataProvider: Loaded debug metadata for module: packages/flutter/src/cupertino/app.dart
[        ] MetadataProvider: Loaded debug metadata for module: packages/flutter/src/cupertino/scrollbar.dart
[        ] MetadataProvider: Loaded debug metadata for module: packages/flutter/src/cupertino/tab_scaffold.dart
[        ] MetadataProvider: Loaded debug metadata for module: packages/flutter/src/cupertino/bottom_tab_bar.dart
[        ] MetadataProvider: Loaded debug metadata for module: packages/flutter/src/cupertino/switch.dart
[        ] MetadataProvider: Loaded debug metadata for module: packages/flutter/src/cupertino/sliding_segmented_control.dart
[        ] MetadataProvider: Loaded debug metadata for module: packages/flutter/src/cupertino/slider.dart
[        ] MetadataProvider: Loaded debug metadata for module: packages/flutter/src/cupertino/segmented_control.dart
[        ] MetadataProvider: Loaded debug metadata for module: packages/flutter/src/cupertino/search_field.dart
[        ] MetadataProvider: Loaded debug metadata for module: packages/flutter/src/cupertino/refresh.dart
[        ] MetadataProvider: Loaded debug metadata for module: packages/flutter/src/cupertino/activity_indicator.dart
[        ] MetadataProvider: Loaded debug metadata for module: packages/flutter/src/cupertino/picker.dart
[        ] MetadataProvider: Loaded debug metadata for module: packages/flutter/src/cupertino/page_scaffold.dart
[        ] MetadataProvider: Loaded debug metadata for module: packages/flutter/src/cupertino/nav_bar.dart
[        ] MetadataProvider: Loaded debug metadata for module: packages/flutter/src/cupertino/list_tile.dart
[        ] MetadataProvider: Loaded debug metadata for module: packages/flutter/src/cupertino/list_section.dart
[        ] MetadataProvider: Loaded debug metadata for module: packages/flutter/src/cupertino/form_section.dart
[        ] MetadataProvider: Loaded debug metadata for module: packages/flutter/src/cupertino/dialog.dart
[        ] MetadataProvider: Loaded debug metadata for module: packages/flutter/src/cupertino/date_picker.dart
[        ] MetadataProvider: Loaded debug metadata for module: packages/flutter/src/cupertino/context_menu_action.dart
[        ] MetadataProvider: Loaded debug metadata for module: packages/flutter/src/cupertino/context_menu.dart
[        ] MetadataProvider: Loaded debug metadata for module: packages/go_router/src/misc/errors.dart
[        ] MetadataProvider: Loaded debug metadata for module: packages/go_router/src/route_data.dart
[        ] MetadataProvider: Loaded debug metadata for module: packages/flutter/material.dart
[        ] MetadataProvider: Loaded debug metadata for module: packages/flutter/src/material/user_accounts_drawer_header.dart
[        ] MetadataProvider: Loaded debug metadata for module: packages/flutter/src/material/icon_button.dart
[        ] MetadataProvider: Loaded debug metadata for module: packages/flutter/src/material/typography.dart
[        ] MetadataProvider: Loaded debug metadata for module: packages/flutter/src/material/colors.dart
[        ] MetadataProvider: Loaded debug metadata for module: packages/flutter/src/material/material_state.dart
[        ] MetadataProvider: Loaded debug metadata for module: packages/flutter/src/material/input_border.dart
[        ] MetadataProvider: Loaded debug metadata for module: packages/flutter/src/material/constants.dart
[        ] MetadataProvider: Loaded debug metadata for module: packages/material_color_utilities/material_color_utilities.dart
[        ] MetadataProvider: Loaded debug metadata for module: packages/material_color_utilities/score/score.dart
[        ] MetadataProvider: Loaded debug metadata for module: packages/material_color_utilities/utils/math_utils.dart
[        ] MetadataProvider: Loaded debug metadata for module: packages/material_color_utilities/hct/hct.dart
[        ] MetadataProvider: Loaded debug metadata for module: packages/material_color_utilities/hct/hct_solver.dart
[        ] MetadataProvider: Loaded debug metadata for module: packages/material_color_utilities/hct/viewing_conditions.dart
[        ] MetadataProvider: Loaded debug metadata for module: packages/material_color_utilities/utils/color_utils.dart
[        ] MetadataProvider: Loaded debug metadata for module: packages/material_color_utilities/hct/cam16.dart
[        ] MetadataProvider: Loaded debug metadata for module: packages/material_color_utilities/scheme/scheme.dart
[        ] MetadataProvider: Loaded debug metadata for module: packages/material_color_utilities/palettes/core_palette.dart
[        ] MetadataProvider: Loaded debug metadata for module: packages/material_color_utilities/palettes/tonal_palette.dart
[        ] MetadataProvider: Loaded debug metadata for module: packages/material_color_utilities/quantize/quantizer_wu.dart
[        ] MetadataProvider: Loaded debug metadata for module: packages/material_color_utilities/quantize/quantizer_map.dart
[        ] MetadataProvider: Loaded debug metadata for module: packages/material_color_utilities/quantize/quantizer.dart
[        ] MetadataProvider: Loaded debug metadata for module: packages/material_color_utilities/quantize/quantizer_wsmeans.dart
[        ] MetadataProvider: Loaded debug metadata for module: packages/material_color_utilities/quantize/point_provider_lab.dart
[        ] MetadataProvider: Loaded debug metadata for module: packages/material_color_utilities/quantize/point_provider.dart
[        ] MetadataProvider: Loaded debug metadata for module: packages/material_color_utilities/quantize/quantizer_celebi.dart
[        ] MetadataProvider: Loaded debug metadata for module: packages/material_color_utilities/blend/blend.dart
[        ] MetadataProvider: Loaded debug metadata for module: packages/flutter/src/material/tooltip_visibility.dart
[        ] MetadataProvider: Loaded debug metadata for module: packages/flutter/src/material/floating_action_button_theme.dart
[        ] MetadataProvider: Loaded debug metadata for module: packages/flutter/src/material/material_state_mixin.dart
[        ] MetadataProvider: Loaded debug metadata for module: packages/flutter/src/material/curves.dart
[        ] MetadataProvider: Loaded debug metadata for module: packages/flutter/src/material/bottom_sheet_theme.dart
[        ] MetadataProvider: Loaded debug metadata for module: packages/flutter/src/material/tab_indicator.dart
[        ] MetadataProvider: Loaded debug metadata for module: packages/flutter/src/material/tab_controller.dart
[        ] MetadataProvider: Loaded debug metadata for module: packages/flutter/src/material/icons.dart
[        ] MetadataProvider: Loaded debug metadata for module: packages/flutter/src/material/drawer_header.dart
[        ] MetadataProvider: Loaded debug metadata for module: packages/flutter/src/material/toggleable.dart
[        ] MetadataProvider: Loaded debug metadata for module: packages/flutter/src/material/toggle_buttons.dart
[   +1 ms] MetadataProvider: Loaded debug metadata for module: packages/flutter/src/material/time_picker.dart
[        ] MetadataProvider: Loaded debug metadata for module: packages/flutter/src/material/text_form_field.dart
[        ] MetadataProvider: Loaded debug metadata for module: packages/flutter/src/material/text_field.dart
[        ] MetadataProvider: Loaded debug metadata for module: packages/flutter/src/material/text_selection.dart
[        ] MetadataProvider: Loaded debug metadata for module: packages/flutter/src/material/text_selection_toolbar_text_button.dart      
[        ] MetadataProvider: Loaded debug metadata for module: packages/flutter/src/material/text_selection_toolbar.dart
[        ] MetadataProvider: Loaded debug metadata for module: packages/flutter/src/material/selectable_text.dart
[        ] MetadataProvider: Loaded debug metadata for module: packages/flutter/src/material/magnifier.dart
[        ] MetadataProvider: Loaded debug metadata for module: packages/flutter/src/material/desktop_text_selection.dart
[        ] MetadataProvider: Loaded debug metadata for module: packages/flutter/src/material/dialog.dart
[        ] MetadataProvider: Loaded debug metadata for module: packages/flutter/src/material/switch_list_tile.dart
[        ] MetadataProvider: Loaded debug metadata for module: packages/flutter/src/material/switch.dart
[        ] MetadataProvider: Loaded debug metadata for module: packages/flutter/src/material/shadows.dart
[        ] MetadataProvider: Loaded debug metadata for module: packages/flutter/src/material/stepper.dart
[        ] MetadataProvider: Loaded debug metadata for module: packages/flutter/src/material/slider.dart
[        ] MetadataProvider: Loaded debug metadata for module: packages/flutter/src/material/selection_area.dart
[        ] MetadataProvider: Loaded debug metadata for module: packages/flutter/src/material/search.dart
[        ] MetadataProvider: Loaded debug metadata for module: packages/flutter/src/material/scrollbar.dart
[        ] MetadataProvider: Loaded debug metadata for module: packages/flutter/src/material/reorderable_list.dart
[        ] MetadataProvider: Loaded debug metadata for module: packages/flutter/src/material/refresh_indicator.dart
[        ] MetadataProvider: Loaded debug metadata for module: packages/flutter/src/material/progress_indicator.dart
[        ] MetadataProvider: Loaded debug metadata for module: packages/flutter/src/material/range_slider.dart
[        ] MetadataProvider: Loaded debug metadata for module: packages/flutter/src/material/radio_list_tile.dart
[        ] MetadataProvider: Loaded debug metadata for module: packages/flutter/src/material/radio.dart
[        ] MetadataProvider: Loaded debug metadata for module: packages/flutter/src/material/popup_menu.dart
[        ] MetadataProvider: Loaded debug metadata for module: packages/flutter/src/material/paginated_data_table.dart
[        ] MetadataProvider: Loaded debug metadata for module: packages/flutter/src/material/dropdown.dart
[        ] MetadataProvider: Loaded debug metadata for module: packages/flutter/src/material/data_table_source.dart
[        ] MetadataProvider: Loaded debug metadata for module: packages/flutter/src/material/data_table.dart
[        ] MetadataProvider: Loaded debug metadata for module: packages/flutter/src/material/checkbox.dart
[        ] MetadataProvider: Loaded debug metadata for module: packages/flutter/src/material/card.dart
[        ] MetadataProvider: Loaded debug metadata for module: packages/flutter/src/material/page.dart
[        ] MetadataProvider: Loaded debug metadata for module: packages/flutter/src/material/outlined_button.dart
[        ] MetadataProvider: Loaded debug metadata for module: packages/flutter/src/material/no_splash.dart
[        ] MetadataProvider: Loaded debug metadata for module: packages/flutter/src/material/mergeable_material.dart
[        ] MetadataProvider: Loaded debug metadata for module: packages/flutter/src/material/input_date_picker_form_field.dart
[        ] MetadataProvider: Loaded debug metadata for module: packages/flutter/src/material/date.dart
[        ] MetadataProvider: Loaded debug metadata for module: packages/flutter/src/material/input_chip.dart
[        ] MetadataProvider: Loaded debug metadata for module: packages/flutter/src/material/chip.dart
[        ] MetadataProvider: Loaded debug metadata for module: packages/flutter/src/material/grid_tile_bar.dart
[        ] MetadataProvider: Loaded debug metadata for module: packages/flutter/src/material/grid_tile.dart
[        ] MetadataProvider: Loaded debug metadata for module: packages/flutter/src/material/flutter_logo.dart
[        ] MetadataProvider: Loaded debug metadata for module: packages/flutter/src/material/filter_chip.dart
[        ] MetadataProvider: Loaded debug metadata for module: packages/flutter/src/material/filled_button.dart
[        ] MetadataProvider: Loaded debug metadata for module: packages/flutter/src/material/expansion_tile.dart
[        ] MetadataProvider: Loaded debug metadata for module: packages/flutter/src/material/expansion_panel.dart
[        ] MetadataProvider: Loaded debug metadata for module: packages/flutter/src/material/expand_icon.dart
[        ] MetadataProvider: Loaded debug metadata for module: packages/flutter/src/material/elevated_button.dart
[        ] MetadataProvider: Loaded debug metadata for module: packages/flutter/src/material/date_picker.dart
[        ] MetadataProvider: Loaded debug metadata for module: packages/flutter/src/material/calendar_date_picker.dart
[        ] MetadataProvider: Loaded debug metadata for module: packages/flutter/src/material/circle_avatar.dart
[        ] MetadataProvider: Loaded debug metadata for module: packages/flutter/src/material/choice_chip.dart
[        ] MetadataProvider: Loaded debug metadata for module: packages/flutter/src/material/checkbox_list_tile.dart
[        ] MetadataProvider: Loaded debug metadata for module: packages/flutter/src/material/button_bar.dart
[        ] MetadataProvider: Loaded debug metadata for module: packages/flutter/src/material/bottom_app_bar.dart
[        ] MetadataProvider: Loaded debug metadata for module: packages/flutter/src/material/autocomplete.dart
[        ] MetadataProvider: Loaded debug metadata for module: packages/flutter/src/material/arc.dart
[        ] MetadataProvider: Loaded debug metadata for module: packages/flutter/src/material/app.dart
[        ] MetadataProvider: Loaded debug metadata for module: packages/flutter/src/material/animated_icons.dart
[        ] MetadataProvider: Loaded debug metadata for module: packages/flutter/src/material/action_chip.dart
[        ] MetadataProvider: Loaded debug metadata for module: packages/flutter/src/material/about.dart
[        ] MetadataProvider: Loaded debug metadata (sound null safety)
[   +4 ms] DwdsInjector: Injected debugging metadata for entrypoint at http://localhost:58339/main_module.bootstrap.js
[+2053 ms] ChromeProxyService: Initializing expression compiler for main_module.bootstrap.js with sound null safety: true
[  +43 ms] DevHandler: Debug service listening on ws://127.0.0.1:58383/lBpfZUz6QmI=/ws

[  +77 ms] DevHandler: VmService proxy responded with an error:
           {jsonrpc: 2.0, id: 9, error: {code: -32601, message: Method not found, data: {jsonrpc: 2.0, method:
           _setStreamIncludePrivateMembers, id: 9, params: {streamId: Stdout, includePrivateMembers: false}}}}
[   +3 ms] This app is linked to the debug service: ws://127.0.0.1:58383/lBpfZUz6QmI=/ws
[   +1 ms] DevHandler: VmService proxy responded with an error:
           {jsonrpc: 2.0, id: 10, error: {code: -32601, message: Method not found, data: {jsonrpc: 2.0, method:
           _setStreamIncludePrivateMembers, id: 10, params: {streamId: Stderr, includePrivateMembers: false}}}}
[   +1 ms] DevHandler: VmService proxy responded with an error:
           {jsonrpc: 2.0, id: 11, error: {code: -32601, message: Method not found, data: {jsonrpc: 2.0, method:
           _setStreamIncludePrivateMembers, id: 11, params: {streamId: Isolate, includePrivateMembers: false}}}}
[   +3 ms] DevHandler: VmService proxy responded with an error:
           {jsonrpc: 2.0, id: 12, error: {code: -32601, message: Method not found, data: {jsonrpc: 2.0, method:
           _setStreamIncludePrivateMembers, id: 12, params: {streamId: Extension, includePrivateMembers: false}}}}
[   +3 ms] Debug service listening on ws://127.0.0.1:58383/lBpfZUz6QmI=/ws
[        ]  Running with sound null safety 
[   +2 ms]   To hot restart changes while running, press "r" or "R".
[        ] For a more detailed help message, press "h". To quit, press "q".
[        ] An Observatory debugger and profiler on Chrome is available at: http://127.0.0.1:58383/lBpfZUz6QmI=
[   +9 ms] Flutter Web Bootstrap: Programmatic
[+1202 ms] The Flutter DevTools debugger and profiler on Chrome is available at:
http://127.0.0.1:9103?uri=http://127.0.0.1:58383/lBpfZUz6QmI=
Analyzing shellroute_tab...                                             
No issues found! (ran in 1.2s)
[√] Flutter (Channel beta, 3.4.0-17.2.pre, on Microsoft Windows [Version 10.0.22621.607], locale en-US)
    • Flutter version 3.4.0-17.2.pre on channel beta at C:\projects\flutter
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision d6260f127f (7 days ago), 2022-09-21 13:33:49 -0500
    • Engine revision 3950c6140a
    • Dart version 2.19.0 (build 2.19.0-146.2.beta)
    • DevTools version 2.16.0

[√] Android toolchain - develop for Android devices (Android SDK version 33.0.0)
    • Android SDK at C:\Users\matt\AppData\Local\Android\sdk
    • Platform android-33, build-tools 33.0.0
    • Java binary at: C:\Program Files\Android\Android Studio\jre\bin\java
    • Java version OpenJDK Runtime Environment (build 11.0.13+0-b1751.21-8125866)
    • All Android licenses accepted.

[√] Chrome - develop for the web
    • Chrome at C:\Program Files\Google\Chrome\Application\chrome.exe

[√] Visual Studio - develop for Windows (Visual Studio Professional 2022 17.3.4)
    • Visual Studio at C:\Program Files\Microsoft Visual Studio\2022\Professional
    • Visual Studio Professional 2022 version 17.3.32901.215
    • Windows 10 SDK version 10.0.19041.0

[√] Android Studio (version 2021.3)
    • Android Studio at C:\Program Files\Android\Android Studio
    • Flutter plugin can be installed from:
       https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
       https://plugins.jetbrains.com/plugin/6351-dart
    • Java version OpenJDK Runtime Environment (build 11.0.13+0-b1751.21-8125866)

[√] VS Code (version 1.71.2)
    • VS Code at C:\Users\matt\AppData\Local\Programs\Microsoft VS Code
    • Flutter extension version 3.48.0

[√] Connected device (4 available)
    • AOSP TV on x86 (mobile) • emulator-5554 • android-x86    • Android 11 (API 30) (emulator)
    • Windows (desktop)       • windows       • windows-x64    • Microsoft Windows [Version 10.0.22621.607]
    • Chrome (web)            • chrome        • web-javascript • Google Chrome 105.0.5195.127
    • Edge (web)              • edge          • web-javascript • Microsoft Edge 105.0.1343.50

[√] HTTP Host Availability
    • All required HTTP hosts are available

• No issues found!

MattyBoy4444 avatar Sep 28 '22 17:09 MattyBoy4444

Hi @MattyBoy4444, thanks for filing the issue. This issue is reproducible on the latest stable, master and beta channels with provided sample code.

  • MacOS: ❌
  • Web: ❌

✅: No Issue ❌: Issue reproduced

Demo OP issue (ShellRoute)

https://user-images.githubusercontent.com/104349824/193004273-c8756a24-6273-4112-90f3-33ad4e48f31d.mov


I also tested with named_routes and see that the issue does not occur when using Tab key.

Demo named_routes

https://user-images.githubusercontent.com/104349824/193004014-61a44949-902d-45f9-876c-285f08cc180b.mov

Sample code (named_routes)

Modified sample code from https://github.com/flutter/packages/blob/main/packages/go_router/example/lib/named_routes.dart (added TextField, TextButton and BottomNavigationBar)

// Copyright 2013 The Flutter Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

// TODO(goderbauer): Refactor the examples to remove this ignore, https://github.com/flutter/flutter/issues/110210
// ignore_for_file: avoid_dynamic_calls

import 'dart:convert';

import 'package:flutter/material.dart';
import 'package:go_router/go_router.dart';

// This scenario demonstrates how to navigate using named locations instead of
// URLs.
//
// Instead of hardcoding the URI locations , you can also use the named
// locations. To use this API, give a unique name to each GoRoute. The name can
// then be used in context.namedLocation to be translate back to the actual URL
// location.

final Map<String, dynamic> _families = const JsonDecoder().convert('''
{
  "f1": {
    "name": "Doe",
    "people": {
      "p1": {
        "name": "Jane",
        "age": 23
      },
      "p2": {
        "name": "John",
        "age": 6
      }
    }
  },
  "f2": {
    "name": "Wong",
    "people": {
      "p1": {
        "name": "June",
        "age": 51
      },
      "p2": {
        "name": "Xin",
        "age": 44
      }
    }
  }
}
''');

void main() => runApp(App());

/// The main app.
class App extends StatelessWidget {
  /// Creates an [App].
  App({Key? key}) : super(key: key);

  /// The title of the app.
  static const String title = 'GoRouter Example: Named Routes';

  @override
  Widget build(BuildContext context) => MaterialApp.router(
        routerConfig: _router,
        title: title,
        debugShowCheckedModeBanner: false,
      );

  late final GoRouter _router = GoRouter(
    debugLogDiagnostics: true,
    routes: <GoRoute>[
      GoRoute(
        name: 'home',
        path: '/',
        builder: (BuildContext context, GoRouterState state) =>
            const HomeScreen(),
        routes: <GoRoute>[
          GoRoute(
            name: 'family',
            path: 'family/:fid',
            builder: (BuildContext context, GoRouterState state) =>
                FamilyScreen(fid: state.params['fid']!),
            routes: <GoRoute>[
              GoRoute(
                name: 'person',
                path: 'person/:pid',
                builder: (BuildContext context, GoRouterState state) {
                  return PersonScreen(
                      fid: state.params['fid']!, pid: state.params['pid']!);
                },
              ),
            ],
          ),
        ],
      ),
    ],
  );
}

/// The home screen that shows a list of families.
class HomeScreen extends StatelessWidget {
  /// Creates a [HomeScreen].
  const HomeScreen({Key? key}) : super(key: key);

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: const Text(App.title),
      ),
      body: Column(
        children: [
          TextField(),
          TextButton(onPressed: () {}, child: Text('Hello')),
          Flexible(
            child: ListView(
              children: <Widget>[
                for (final String fid in _families.keys)
                  ListTile(
                    title: Text(_families[fid]['name']),
                    onTap: () => context.go(context.namedLocation('family',
                        params: <String, String>{'fid': fid})),
                  )
              ],
            ),
          ),
        ],
      ),
      bottomNavigationBar: BottomNavigationBar(
        items: const <BottomNavigationBarItem>[
          BottomNavigationBarItem(
            icon: Icon(Icons.home),
            label: 'A Screen',
          ),
          BottomNavigationBarItem(
            icon: Icon(Icons.business),
            label: 'B Screen',
          ),
        ],
      ),
    );
  }
}

/// The screen that shows a list of persons in a family.
class FamilyScreen extends StatelessWidget {
  /// Creates a [FamilyScreen].
  const FamilyScreen({required this.fid, Key? key}) : super(key: key);

  /// The id family to display.
  final String fid;

  @override
  Widget build(BuildContext context) {
    final Map<String, dynamic> people =
        _families[fid]['people'] as Map<String, dynamic>;
    return Scaffold(
      appBar: AppBar(title: Text(_families[fid]['name'])),
      body: ListView(
        children: <Widget>[
          for (final String pid in people.keys)
            ListTile(
              title: Text(people[pid]['name']),
              onTap: () => context.go(context.namedLocation(
                'person',
                params: <String, String>{'fid': fid, 'pid': pid},
                queryParams: <String, String>{'qid': 'quid'},
              )),
            ),
        ],
      ),
    );
  }
}

/// The person screen.
class PersonScreen extends StatelessWidget {
  /// Creates a [PersonScreen].
  const PersonScreen({required this.fid, required this.pid, Key? key})
      : super(key: key);

  /// The id of family this person belong to.
  final String fid;

  /// The id of the person to be displayed.
  final String pid;

  @override
  Widget build(BuildContext context) {
    final Map<String, dynamic> family = _families[fid];
    final Map<String, dynamic> person = family['people'][pid];
    return Scaffold(
      appBar: AppBar(title: Text(person['name'])),
      body: Text(
          '${person['name']} ${family['name']} is ${person['age']} years old'),
    );
  }
}

flutter doctor -v
[✓] Flutter (Channel stable, 3.3.3, on macOS 12.6 21G115 darwin-x64, locale en-VN)
    • Flutter version 3.3.3 on channel stable at /Users/huynq/Documents/GitHub/flutter
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision 18a827f393 (10 hours ago), 2022-09-28 10:03:14 -0700
    • Engine revision 5c984c26eb
    • Dart version 2.18.2
    • DevTools version 2.15.0

[✓] Android toolchain - develop for Android devices (Android SDK version 31.0.0)
    • Android SDK at /Users/huynq/Library/Android/sdk
    • Platform android-33, build-tools 31.0.0
    • ANDROID_HOME = /Users/huynq/Library/Android/sdk
    • Java binary at: /Applications/Android Studio.app/Contents/jre/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build 11.0.12+0-b1504.28-7817840)
    • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 14.0.1)
    • Xcode at /Applications/Xcode14.0.1.app/Contents/Developer
    • Build 14A400
    • CocoaPods version 1.11.3

[✓] Chrome - develop for the web
    • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome

[✓] Android Studio (version 2021.2)
    • Android Studio at /Applications/Android Studio.app/Contents
    • Flutter plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/6351-dart
    • Java version OpenJDK Runtime Environment (build 11.0.12+0-b1504.28-7817840)

[✓] IntelliJ IDEA Community Edition (version 2022.2.2)
    • IntelliJ at /Applications/IntelliJ IDEA CE.app
    • Flutter plugin version 70.0.5
    • Dart plugin version 222.4167.21

[✓] IntelliJ IDEA Community Edition (version 2022.1.1)
    • IntelliJ at /Users/huynq/Library/Application Support/JetBrains/Toolbox/apps/IDEA-C/ch-0/221.5591.52/IntelliJ IDEA CE.app
    • Flutter plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/6351-dart

[✓] VS Code (version 1.71.2)
    • VS Code at /Applications/Visual Studio Code.app/Contents
    • Flutter extension version 3.48.0

[✓] Connected device (4 available)
    • SM T225 (mobile)           • R9JT3004VRJ                          • android-arm64  • Android 12 (API 31)
    • iPhone 14 Pro Max (mobile) • 332079AF-E895-4685-910E-7B1E18B0C6B8 • ios            • com.apple.CoreSimulator.SimRuntime.iOS-16-0 (simulator)
    • macOS (desktop)            • macos                                • darwin-x64     • macOS 12.6 21G115 darwin-x64
    • Chrome (web)               • chrome                               • web-javascript • Google Chrome 105.0.5195.125

[✓] HTTP Host Availability
    • All required HTTP hosts are available

• No issues found!

[✓] Flutter (Channel master, 3.4.0-33.0.pre.69, on macOS 12.6 21G115 darwin-x64, locale en-VN)
    • Flutter version 3.4.0-33.0.pre.69 on channel master at /Users/huynq/Documents/GitHub/flutter_master
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision 16046be55a (28 minutes ago), 2022-09-28 22:19:36 -0400
    • Engine revision 38ac18460f
    • Dart version 2.19.0 (build 2.19.0-252.0.dev)
    • DevTools version 2.17.0

[✓] Android toolchain - develop for Android devices (Android SDK version 31.0.0)
    • Android SDK at /Users/huynq/Library/Android/sdk
    • Platform android-33, build-tools 31.0.0
    • ANDROID_HOME = /Users/huynq/Library/Android/sdk
    • Java binary at: /Applications/Android Studio.app/Contents/jre/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build 11.0.12+0-b1504.28-7817840)
    • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 14.0.1)
    • Xcode at /Applications/Xcode14.0.1.app/Contents/Developer
    • Build 14A400
    • CocoaPods version 1.11.3

[✓] Chrome - develop for the web
    • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome

[✓] Android Studio (version 2021.2)
    • Android Studio at /Applications/Android Studio.app/Contents
    • Flutter plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/6351-dart
    • Java version OpenJDK Runtime Environment (build 11.0.12+0-b1504.28-7817840)

[✓] IntelliJ IDEA Community Edition (version 2022.2.2)
    • IntelliJ at /Applications/IntelliJ IDEA CE.app
    • Flutter plugin version 70.0.5
    • Dart plugin version 222.4167.21

[✓] IntelliJ IDEA Community Edition (version 2022.1.1)
    • IntelliJ at /Users/huynq/Library/Application Support/JetBrains/Toolbox/apps/IDEA-C/ch-0/221.5591.52/IntelliJ IDEA CE.app
    • Flutter plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/6351-dart

[✓] VS Code (version 1.71.2)
    • VS Code at /Applications/Visual Studio Code.app/Contents
    • Flutter extension version 3.48.0

[✓] Connected device (4 available)
    • SM T225 (mobile)           • R9JT3004VRJ                          • android-arm64  • Android 12 (API 31)
    • iPhone 14 Pro Max (mobile) • 332079AF-E895-4685-910E-7B1E18B0C6B8 • ios            • com.apple.CoreSimulator.SimRuntime.iOS-16-0 (simulator)
    • macOS (desktop)            • macos                                • darwin-x64     • macOS 12.6 21G115 darwin-x64
    • Chrome (web)               • chrome                               • web-javascript • Google Chrome 105.0.5195.125

[✓] HTTP Host Availability
    • All required HTTP hosts are available

• No issues found!

[✓] Flutter (Channel beta, 3.4.0-17.2.pre, on macOS 12.6 21G115 darwin-x64, locale en-VN)
    • Flutter version 3.4.0-17.2.pre on channel beta at /Users/huynq/Documents/GitHub/flutter_beta
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision d6260f127f (5 days ago), 2022-09-21 13:33:49 -0500
    • Engine revision 3950c6140a
    • Dart version 2.19.0 (build 2.19.0-146.2.beta)
    • DevTools version 2.16.0

[✓] Android toolchain - develop for Android devices (Android SDK version 31.0.0)
    • Android SDK at /Users/huynq/Library/Android/sdk
    • Platform android-33, build-tools 31.0.0
    • ANDROID_HOME = /Users/huynq/Library/Android/sdk
    • Java binary at: /Applications/Android Studio.app/Contents/jre/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build 11.0.12+0-b1504.28-7817840)
    • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 14.0)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Build 14A309
    • CocoaPods version 1.11.3

[✓] Chrome - develop for the web
    • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome

[✓] Android Studio (version 2021.2)
    • Android Studio at /Applications/Android Studio.app/Contents
    • Flutter plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/6351-dart
    • Java version OpenJDK Runtime Environment (build 11.0.12+0-b1504.28-7817840)

[✓] IntelliJ IDEA Community Edition (version 2022.1.1)
    • IntelliJ at /Users/huynq/Library/Application Support/JetBrains/Toolbox/apps/IDEA-C/ch-0/221.5591.52/IntelliJ IDEA CE.app
    • Flutter plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/6351-dart

[✓] VS Code (version 1.71.2)
    • VS Code at /Applications/Visual Studio Code.app/Contents
    • Flutter extension version 3.48.0

[✓] Connected device (3 available)
    • SM T225 (mobile) • R9JT3004VRJ • android-arm64  • Android 12 (API 31)
    • macOS (desktop)  • macos       • darwin-x64     • macOS 12.6 21G115 darwin-x64
    • Chrome (web)     • chrome      • web-javascript • Google Chrome 105.0.5195.125

[✓] HTTP Host Availability
    • All required HTTP hosts are available

• No issues found!

Labeling this issue for further investigation. Thank you!

huycozy avatar Sep 29 '22 10:09 huycozy

This is a framework issue related to https://github.com/flutter/flutter/issues/109624

I think we need to let focus traverse outside of the navigator.

chunhtai avatar Sep 29 '22 21:09 chunhtai

cc @gspencergoog

chunhtai avatar Sep 29 '22 21:09 chunhtai

cc @craiglabenz

johnpryan avatar Sep 29 '22 21:09 johnpryan

There isn't any FocusScope in nested navigators anymore (https://github.com/flutter/flutter/pull/109702), so something else is probably introducing one.

gspencergoog avatar Sep 29 '22 21:09 gspencergoog

@gspencergoog yes I think we talked about this earlier that the ModalRoute is introducing one here https://github.com/flutter/flutter/blob/2ae6f536afd7e4484444495d6bd15ace804558de/packages/flutter/lib/src/widgets/routes.dart#L916

We should probably use a focus traversal group with a custom policy

chunhtai avatar Sep 29 '22 22:09 chunhtai

I am experiencing the same problem

Sample code
import 'package:flutter/material.dart';
import 'package:go_router/go_router.dart';
import 'package:flutter/services.dart';

void main() async {
  runApp(const MainApp());
}

// some extensions for tabs
class ScaffoldWithBottomNavBarTabItem extends BottomNavigationBarItem {
  final String initialLocation;
  const ScaffoldWithBottomNavBarTabItem(
      {required this.initialLocation, required Widget icon, String? label})
      : super(icon: icon, label: label);
}

class ScaffoldWithSideNavBarTabItem extends NavigationRailDestination {
  final String initialLocation;
  const ScaffoldWithSideNavBarTabItem(
      {required this.initialLocation, required Widget icon, required Widget selectedIcon, required Widget label})
      : super(icon: icon, selectedIcon: selectedIcon, label: label);
}

// tabs 
const bottom_nav_bar_tabs = [
  ScaffoldWithBottomNavBarTabItem(
    initialLocation: '/',
    icon: Icon(Icons.home),
    label: 'Page1',
  ),
  ScaffoldWithBottomNavBarTabItem(
    initialLocation: '/page2',
    icon: Icon(Icons.forum),
    label: 'Page2',
  ),
  ScaffoldWithBottomNavBarTabItem(
    initialLocation: '/page3',
    icon: Icon(Icons.search),
    label: 'Page3',
  ),
];
const side_nav_bar_tabs = [
  ScaffoldWithSideNavBarTabItem(
    initialLocation: '/',
    icon: Icon(Icons.home),
    selectedIcon: Icon(Icons.home),
    label: Text('Page1'),
  ),
  ScaffoldWithSideNavBarTabItem(
    initialLocation: '/page2',
    icon: Icon(Icons.forum),
    selectedIcon: Icon(Icons.forum),
    label: Text('Page2'),
  ),
  ScaffoldWithSideNavBarTabItem(
    initialLocation: '/page3',
    icon: Icon(Icons.search),
    selectedIcon: Icon(Icons.search),
    label: Text('Page 3'),
  ),
];

int currentIndex(BuildContext context, List tabs) {
  String loc = GoRouterState.of(context).location;
  int index = tabs.indexWhere((t) => t.initialLocation.startsWith(loc));
  if (index < 0) {
    if (loc.startsWith('/user')) {
      return tabs.indexWhere((t) => t.initialLocation.endsWith('/user'));
    } else if (loc.startsWith('/anime')) {
      return tabs.indexWhere((t) => t.initialLocation.endsWith('/browse'));
    } else if (loc.startsWith('/browse')) {
      return tabs.indexWhere((t) => t.initialLocation.endsWith('/browse'));
    } else if (loc.startsWith('/forum')) {
      return tabs.indexWhere((t) => t.initialLocation.endsWith('/forum'));
    } else {
      return 0;
    }
  } else {
    return index;
  }
}

void onItemTapped(BuildContext context, List tabs, int tabIndex) {
  if (tabIndex != currentIndex) {
    context.go(tabs[tabIndex].initialLocation);
  }
}

// bottom nav bar
class ScaffoldWithBottomNavbar extends StatelessWidget {
  final Widget child;
  const ScaffoldWithBottomNavbar({super.key, required this.child});

  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: const Text('Error sample app'),
        actions: [
          IconButton(
            icon: Icon(Icons.search),
            onPressed: () => context.goNamed('page3'),
          ),
        ]
      ),
      body: child,
      bottomNavigationBar: BottomNavigationBar(
        type: BottomNavigationBarType.fixed,
        showSelectedLabels: false,
        showUnselectedLabels: false,
        currentIndex: currentIndex(context, bottom_nav_bar_tabs),
        onTap: (index) => onItemTapped(context, bottom_nav_bar_tabs, index),
        items: bottom_nav_bar_tabs,
      ),
    );
  }
}

// nav rail
class ScaffoldWithSideNavbar extends StatelessWidget {
  final Widget child;
  const ScaffoldWithSideNavbar({super.key, required this.child});

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: const Text('Error sample app'),
        actions: [
          IconButton(
            icon: Icon(Icons.search),
            onPressed: () => context.goNamed('page3'),
          ),
        ]
      ),
      body: Row(
        children: [
          NavigationRail(
            destinations: side_nav_bar_tabs,
            selectedIndex: currentIndex(context, side_nav_bar_tabs),
            onDestinationSelected: (int index) => onItemTapped(context, side_nav_bar_tabs, index),
            groupAlignment: 0.0,
            //labelType: NavigationRailLabelType.none,
          ),
          Expanded(
            child: child,
          ),
        ],
      ),
    );
  }
}

// get screen according to screen size 
return_screen(BuildContext context, Widget child) {
  var device_width = MediaQuery.of(context).size.width;

  if (device_width <= 600) {
    return ScaffoldWithBottomNavbar(child: child);
  } else {
    return ScaffoldWithSideNavbar(child: child);
  }
}

// router
final router_data = GoRouter(
  initialLocation: '/',
  routes: <RouteBase>[
    ShellRoute(
      builder: (context, state, child) {
        return return_screen(context, child);
      },
      routes: <RouteBase>[
        GoRoute(
          name: 'page1',
          path: '/',
          builder: (context, state) => Page1(),
        ),
        GoRoute(
          name: 'page2',
          path: '/page2',
          builder: (context, state) => Page2(),
        ),
        GoRoute(
          name: 'page3',
          path: '/page3',
          builder: (context, state) => Page3(),
        ),
      ],
    ),
  ],
);

// pages
class Page1 extends StatelessWidget {
  const Page1({super.key});

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      body: Center(
        child: Row(
          children: [
            Text('Page 1'),
            ElevatedButton(
              onPressed: () => print('user pressed btn 1'),
              child: Text('btn 1'),
            ),
            ElevatedButton(
              onPressed: () => print('user pressed btn 2'),
              child: Text('btn 2'),
            ),
            ElevatedButton(
              onPressed: () => print('user pressed btn 3'),
              child: Text('btn 3'),
            ),
          ],
        ),
      ),
    );
  }
}
class Page2 extends StatelessWidget {
  const Page2({super.key});

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      body: ScaffoldWithSideNavbar(
        child: Row(
          children: [
            Text('Page 2'),
            ElevatedButton(
              onPressed: () => print('user pressed btn 1'),
              child: Text('btn 1'),
            ),
            ElevatedButton(
              onPressed: () => print('user pressed btn 2'),
              child: Text('btn 2'),
            ),
            ElevatedButton(
              onPressed: () => print('user pressed btn 3'),
              child: Text('btn 3'),
            ),
          ],
        ),
      ),
    );
  }
}
class Page3 extends StatelessWidget {
  const Page3({super.key});

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      body: Center(
        child: Row(
          children: [
            Text('Page 3'),
            ElevatedButton(
              onPressed: () => print('user pressed btn 1'),
              child: Text('btn 1'),
            ),
            ElevatedButton(
              onPressed: () => print('user pressed btn 2'),
              child: Text('btn 2'),
            ),
            ElevatedButton(
              onPressed: () => print('user pressed btn 3'),
              child: Text('btn 3'),
            ),
            Text('Please help me get over this problem'),
          ],
        ),
      ),
    );
  }
}

class LeftIntent extends Intent {}
class RightIntent extends Intent {}
class UpIntent extends Intent {}
class DownIntent extends Intent {}
class ActionIntent extends Intent {}

class MainApp extends StatelessWidget {
  const MainApp({super.key});

  @override
  Widget build(BuildContext context) {
    return Shortcuts(
      shortcuts: <LogicalKeySet, Intent>{
        LogicalKeySet(LogicalKeyboardKey.select): const ActivateIntent(), // OR could be : ActionIntent(),
        LogicalKeySet(LogicalKeyboardKey.arrowUp): UpIntent(),
        LogicalKeySet(LogicalKeyboardKey.arrowDown): DownIntent(),
        LogicalKeySet(LogicalKeyboardKey.arrowLeft): LeftIntent(),
        LogicalKeySet(LogicalKeyboardKey.arrowRight): RightIntent(),
      },
      child: MaterialApp.router(
        title: 'Error sample app',
        debugShowCheckedModeBanner: false,
        routerConfig: router_data,
      ),
    );
  }
}

abhishek-m-raj avatar Jun 07 '23 06:06 abhishek-m-raj

'' 'dart import 'package:flutter/material.dart'; import 'package:go_router/go_router.dart'; import 'package:flutter/services.dart';

void main() async { runApp(const MainApp()); }

// some extensions for tabs class ScaffoldWithBottomNavBarTabItem extends BottomNavigationBarItem { final String initialLocation; const ScaffoldWithBottomNavBarTabItem( {required this.initialLocation, required Widget icon, String? label}) : super(icon: icon, label: label); }

class ScaffoldWithSideNavBarTabItem extends NavigationRailDestination { final String initialLocation; const ScaffoldWithSideNavBarTabItem( {required this.initialLocation, required Widget icon, required Widget selectedIcon, required Widget label}) : super(icon: icon, selectedIcon: selectedIcon, label: label); }

// tabs const bottom_nav_bar_tabs = [ ScaffoldWithBottomNavBarTabItem( initialLocation: '/', icon: Icon(Icons.home), label: 'Page1', ), ScaffoldWithBottomNavBarTabItem( initialLocation: '/page2', icon: Icon(Icons.forum), label: 'Page2', ), ScaffoldWithBottomNavBarTabItem( initialLocation: '/page3', icon: Icon(Icons.search), label: 'Page3', ), ]; const side_nav_bar_tabs = [ ScaffoldWithSideNavBarTabItem( initialLocation: '/', icon: Icon(Icons.home), selectedIcon: Icon(Icons.home), label: Text('Page1'), ), ScaffoldWithSideNavBarTabItem( initialLocation: '/page2', icon: Icon(Icons.forum), selectedIcon: Icon(Icons.forum), label: Text('Page2'), ), ScaffoldWithSideNavBarTabItem( initialLocation: '/page3', icon: Icon(Icons.search), selectedIcon: Icon(Icons.search), label: Text('Page 3'), ), ];

int currentIndex(BuildContext context, List tabs) { String loc = GoRouterState.of(context).location; int index = tabs.indexWhere((t) => t.initialLocation.startsWith(loc)); if (index < 0) { if (loc.startsWith('/user')) { return tabs.indexWhere((t) => t.initialLocation.endsWith('/user')); } else if (loc.startsWith('/anime')) { return tabs.indexWhere((t) => t.initialLocation.endsWith('/browse')); } else if (loc.startsWith('/browse')) { return tabs.indexWhere((t) => t.initialLocation.endsWith('/browse')); } else if (loc.startsWith('/forum')) { return tabs.indexWhere((t) => t.initialLocation.endsWith('/forum')); } else { return 0; } } else { return index; } }

void onItemTapped(BuildContext context, List tabs, int tabIndex) { if (tabIndex != currentIndex) { context.go(tabs[tabIndex].initialLocation); } }

// bottom nav bar class ScaffoldWithBottomNavbar extends StatelessWidget { final Widget child; const ScaffoldWithBottomNavbar({super.key, required this.child});

Widget build(BuildContext context) { return Scaffold( appBar: AppBar( title: const Text('Error sample app'), actions: [ IconButton( icon: Icon(Icons.search), onPressed: () => context.goNamed('page3'), ), ] ), body: child, bottomNavigationBar: BottomNavigationBar( type: BottomNavigationBarType.fixed, showSelectedLabels: false, showUnselectedLabels: false, currentIndex: currentIndex(context, bottom_nav_bar_tabs), onTap: (index) => onItemTapped(context, bottom_nav_bar_tabs, index), items: bottom_nav_bar_tabs, ), ); } }

// nav rail class ScaffoldWithSideNavbar extends StatelessWidget { final Widget child; const ScaffoldWithSideNavbar({super.key, required this.child});

@override Widget build(BuildContext context) { return Scaffold( appBar: AppBar( title: const Text('Error sample app'), actions: [ IconButton( icon: Icon(Icons.search), onPressed: () => context.goNamed('page3'), ), ] ), body: Row( children: [ NavigationRail( destinations: side_nav_bar_tabs, selectedIndex: currentIndex(context, side_nav_bar_tabs), onDestinationSelected: (int index) => onItemTapped(context, side_nav_bar_tabs, index), groupAlignment: 0.0, //labelType: NavigationRailLabelType.none, ), Expanded( child: child, ), ], ), ); } }

// get screen according to screen size return_screen(BuildContext context, Widget child) { var device_width = MediaQuery.of(context).size.width;

if (device_width <= 600) { return ScaffoldWithBottomNavbar(child: child); } else { return ScaffoldWithSideNavbar(child: child); } }

// router final router_data = GoRouter( initialLocation: '/', routes: <RouteBase>[ ShellRoute( builder: (context, state, child) { return return_screen(context, child); }, routes: <RouteBase>[ GoRoute( name: 'page1', path: '/', builder: (context, state) => Page1(), ), GoRoute( name: 'page2', path: '/page2', builder: (context, state) => Page2(), ), GoRoute( name: 'page3', path: '/page3', builder: (context, state) => Page3(), ), ], ), ], );

// pages class Page1 extends StatelessWidget { const Page1({super.key});

@override Widget build(BuildContext context) { return Scaffold( body: Center( child: Row( children: [ Text('Page 1'), ElevatedButton( onPressed: () => print('user pressed btn 1'), child: Text('btn 1'), ), ElevatedButton( onPressed: () => print('user pressed btn 2'), child: Text('btn 2'), ), ElevatedButton( onPressed: () => print('user pressed btn 3'), child: Text('btn 3'), ), ], ), ), ); } } class Page2 extends StatelessWidget { const Page2({super.key});

@override Widget build(BuildContext context) { return Scaffold( body: ScaffoldWithSideNavbar( child: Row( children: [ Text('Page 2'), ElevatedButton( onPressed: () => print('user pressed btn 1'), child: Text('btn 1'), ), ElevatedButton( onPressed: () => print('user pressed btn 2'), child: Text('btn 2'), ), ElevatedButton( onPressed: () => print('user pressed btn 3'), child: Text('btn 3'), ), ], ), ), ); } } class Page3 extends StatelessWidget { const Page3({super.key});

@override Widget build(BuildContext context) { return Scaffold( body: Center( child: Row( children: [ Text('Page 3'), ElevatedButton( onPressed: () => print('user pressed btn 1'), child: Text('btn 1'), ), ElevatedButton( onPressed: () => print('user pressed btn 2'), child: Text('btn 2'), ), ElevatedButton( onPressed: () => print('user pressed btn 3'), child: Text('btn 3'), ), Text('Please help me get over this problem'), ], ), ), ); } }

class LeftIntent extends Intent {} class RightIntent extends Intent {} class UpIntent extends Intent {} class DownIntent extends Intent {} class ActionIntent extends Intent {}

class MainApp extends StatelessWidget { const MainApp({super.key});

@override Widget build(BuildContext context) { return Shortcuts( shortcuts: <LogicalKeySet, Intent>{ LogicalKeySet(LogicalKeyboardKey.select): const ActivateIntent(), // OR could be : ActionIntent(), LogicalKeySet(LogicalKeyboardKey.arrowUp): UpIntent(), LogicalKeySet(LogicalKeyboardKey.arrowDown): DownIntent(), LogicalKeySet(LogicalKeyboardKey.arrowLeft): LeftIntent(), LogicalKeySet(LogicalKeyboardKey.arrowRight): RightIntent(), }, child: MaterialApp.router( title: 'Error sample app', debugShowCheckedModeBanner: false, routerConfig: router_data, ), ); } } ''' sample code

abhishek-m-raj avatar Jun 07 '23 06:06 abhishek-m-raj

@Prince-of-death I updated your comment for beautifully formatted comment.

huycozy avatar Jun 07 '23 08:06 huycozy

@Prince-of-death I updated your comment for beautifully formatted comment.

thanks

abhishek-m-raj avatar Jun 07 '23 16:06 abhishek-m-raj

@huycozy i tried it but it did'nt work

abhishek-m-raj avatar Jun 07 '23 16:06 abhishek-m-raj

@huycozy Also you are not using a shell route

abhishek-m-raj avatar Jun 07 '23 16:06 abhishek-m-raj

Here is the code

Edited code
import 'package:flutter/material.dart';
import 'package:go_router/go_router.dart';
import 'package:flutter/services.dart';

void main() async {
  runApp(const MainApp());
}

// some extensions for tabs
class ScaffoldWithBottomNavBarTabItem extends BottomNavigationBarItem {
  final String initialLocation;
  const ScaffoldWithBottomNavBarTabItem(
      {required this.initialLocation, required Widget icon, String? label})
      : super(icon: icon, label: label);
}

class ScaffoldWithSideNavBarTabItem extends NavigationRailDestination {
  final String initialLocation;
  const ScaffoldWithSideNavBarTabItem(
      {required this.initialLocation, required Widget icon, required Widget selectedIcon, required Widget label})
      : super(icon: icon, selectedIcon: selectedIcon, label: label);
}

// tabs 
const bottom_nav_bar_tabs = [
  ScaffoldWithBottomNavBarTabItem(
    initialLocation: 'page1',
    icon: Icon(Icons.home),
    label: 'Page1',
  ),
  ScaffoldWithBottomNavBarTabItem(
    initialLocation: 'page2',
    icon: Icon(Icons.forum),
    label: 'Page2',
  ),
  ScaffoldWithBottomNavBarTabItem(
    initialLocation: 'page3',
    icon: Icon(Icons.search),
    label: 'Page3',
  ),
];
const side_nav_bar_tabs = [
  ScaffoldWithSideNavBarTabItem(
    initialLocation: 'page1',
    icon: Icon(Icons.home),
    selectedIcon: Icon(Icons.home),
    label: Text('Page1'),
  ),
  ScaffoldWithSideNavBarTabItem(
    initialLocation: 'page2',
    icon: Icon(Icons.forum),
    selectedIcon: Icon(Icons.forum),
    label: Text('Page2'),
  ),
  ScaffoldWithSideNavBarTabItem(
    initialLocation: 'page3',
    icon: Icon(Icons.search),
    selectedIcon: Icon(Icons.search),
    label: Text('Page 3'),
  ),
];

int currentIndex(BuildContext context, List tabs) {
  String loc = GoRouterState.of(context).location;
  int index = tabs.indexWhere((t) => t.initialLocation.startsWith(loc));
  if (index < 0) {
    return 0;
  } else {
    return index;
  }
}

void onItemTapped(BuildContext context, List tabs, int tabIndex) {
  if (tabIndex != currentIndex) {
    context.go(context.namedLocation(tabs[tabIndex].initialLocation));
  }
}

// bottom nav bar
class ScaffoldWithBottomNavbar extends StatelessWidget {
  final Widget child;
  const ScaffoldWithBottomNavbar({super.key, required this.child});

  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: const Text('Error sample app'),
        actions: [
          IconButton(
            icon: Icon(Icons.search),
            onPressed: () => context.goNamed('page3'),
          ),
        ]
      ),
      body: child,
      bottomNavigationBar: BottomNavigationBar(
        type: BottomNavigationBarType.fixed,
        showSelectedLabels: false,
        showUnselectedLabels: false,
        currentIndex: currentIndex(context, bottom_nav_bar_tabs),
        onTap: (index) => onItemTapped(context, bottom_nav_bar_tabs, index),
        items: bottom_nav_bar_tabs,
      ),
    );
  }
}

// nav rail
class ScaffoldWithSideNavbar extends StatelessWidget {
  final Widget child;
  const ScaffoldWithSideNavbar({super.key, required this.child});

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: const Text('Error sample app'),
        actions: [
          IconButton(
            icon: Icon(Icons.search),
            onPressed: () => context.goNamed('page3'),
          ),
        ]
      ),
      body: Row(
        children: [
          NavigationRail(
            destinations: side_nav_bar_tabs,
            selectedIndex: currentIndex(context, side_nav_bar_tabs),
            onDestinationSelected: (int index) => onItemTapped(context, side_nav_bar_tabs, index),
            groupAlignment: 0.0,
            //labelType: NavigationRailLabelType.none,
          ),
          Expanded(
            child: child,
          ),
        ],
      ),
    );
  }
}

// get screen according to screen size 
return_screen(BuildContext context, Widget child) {
  var device_width = MediaQuery.of(context).size.width;

  if (device_width <= 600) {
    return ScaffoldWithBottomNavbar(child: child);
  } else {
    return ScaffoldWithSideNavbar(child: child);
  }
}

// router
final router_data = GoRouter(
  initialLocation: '/',
  routes: <RouteBase>[
    ShellRoute(
      builder: (context, state, child) {
        return return_screen(context, child);
      },
      routes: <RouteBase>[
        GoRoute(
          name: 'page1',
          path: '/',
          builder: (context, state) => Page1(),
        ),
        GoRoute(
          name: 'page2',
          path: '/page2',
          builder: (context, state) => Page2(),
        ),
        GoRoute(
          name: 'page3',
          path: '/page3',
          builder: (context, state) => Page3(),
        ),
      ],
    ),
  ],
);

// pages
class Page1 extends StatelessWidget {
  const Page1({super.key});

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      body: Center(
        child: Row(
          children: [
            Text('Page 1'),
            ElevatedButton(
              onPressed: () => print('user pressed btn 1'),
              child: Text('btn 1'),
            ),
            ElevatedButton(
              onPressed: () => print('user pressed btn 2'),
              child: Text('btn 2'),
            ),
            ElevatedButton(
              onPressed: () => print('user pressed btn 3'),
              child: Text('btn 3'),
            ),
          ],
        ),
      ),
    );
  }
}
class Page2 extends StatelessWidget {
  const Page2({super.key});

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      body: ScaffoldWithSideNavbar(
        child: Row(
          children: [
            Text('Page 2'),
            ElevatedButton(
              onPressed: () => print('user pressed btn 1'),
              child: Text('btn 1'),
            ),
            ElevatedButton(
              onPressed: () => print('user pressed btn 2'),
              child: Text('btn 2'),
            ),
            ElevatedButton(
              onPressed: () => print('user pressed btn 3'),
              child: Text('btn 3'),
            ),
          ],
        ),
      ),
    );
  }
}
class Page3 extends StatelessWidget {
  const Page3({super.key});

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      body: Center(
        child: Row(
          children: [
            Text('Page 3'),
            ElevatedButton(
              onPressed: () => print('user pressed btn 1'),
              child: Text('btn 1'),
            ),
            ElevatedButton(
              onPressed: () => print('user pressed btn 2'),
              child: Text('btn 2'),
            ),
            ElevatedButton(
              onPressed: () => print('user pressed btn 3'),
              child: Text('btn 3'),
            ),
            Text('Please help me get over this problem'),
          ],
        ),
      ),
    );
  }
}

class LeftIntent extends Intent {}
class RightIntent extends Intent {}
class UpIntent extends Intent {}
class DownIntent extends Intent {}
class ActionIntent extends Intent {}

class MainApp extends StatelessWidget {
  const MainApp({super.key});

  @override
  Widget build(BuildContext context) {
    return Shortcuts(
      shortcuts: <LogicalKeySet, Intent>{
        LogicalKeySet(LogicalKeyboardKey.select): const ActivateIntent(), // OR could be : ActionIntent(),
        LogicalKeySet(LogicalKeyboardKey.arrowUp): UpIntent(),
        LogicalKeySet(LogicalKeyboardKey.arrowDown): DownIntent(),
        LogicalKeySet(LogicalKeyboardKey.arrowLeft): LeftIntent(),
        LogicalKeySet(LogicalKeyboardKey.arrowRight): RightIntent(),
      },
      child: MaterialApp.router(
        title: 'Error sample app',
        debugShowCheckedModeBanner: false,
        routerConfig: router_data,
      ),
    );
  }
}

abhishek-m-raj avatar Jun 07 '23 16:06 abhishek-m-raj

@chunhtai @gspencergoog Please help

abhishek-m-raj avatar Jun 08 '23 08:06 abhishek-m-raj

any solution to this, cant seem to focus on widgets in the shellroute widget

alijamal6459 avatar Jul 14 '23 16:07 alijamal6459

add to P0 as internal bug is P2

chunhtai avatar Jul 14 '23 16:07 chunhtai

Our new priority scheme is shifted by two from our old priority scheme which I believe means it is now consistent with Google's internal bug priority scheme.

Hixie avatar Jul 18 '23 22:07 Hixie

Looks like https://github.com/flutter/flutter/pull/130841 got reverted, can this issue be reopened?

math1man avatar Sep 14 '23 15:09 math1man

This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of flutter doctor -v and a minimal reproduction of the issue.

github-actions[bot] avatar Oct 24 '23 04:10 github-actions[bot]