Skip to content

List routing is broken in the example #114

@jpnurmi

Description

@jpnurmi

Steps to reproduce:

  • run the example
  • click "HOME"
  • click "LIST"

Result:

Launching lib/main.dart on Android SDK built for x86 in debug mode...
Running Gradle task 'assembleDebug'...
✓ Built build/app/outputs/apk/debug/app-debug.apk.
Installing build/app/outputs/apk/app.apk...
I/flutter (10009): -- AppModule INITIALIZED
Debug service listening on ws://127.0.0.1:45615/CwdWgfi7tpY=/ws
Syncing files to device Android SDK built for x86...
I/flutter (10009): -- TabsModule INITIALIZED
I/flutter (10009): -- Tab1Module INITIALIZED
I/flutter (10009): -- Tab2Module INITIALIZED
I/flutter (10009): -- HomeModule INITIALIZED

════════ Exception caught by gesture ═══════════════════════════════════════════════════════════════
The following assertion was thrown while handling a gesture:
Could not find a generator for route RouteSettings("/list/0", null) in the _WidgetsAppState.

Generators for routes are searched for in the following order:
 1. For the "/" route, the "home" property, if non-null, is used.
 2. Otherwise, the "routes" table is used, if it has an entry for the route.
 3. Otherwise, onGenerateRoute is called. It should return a non-null value for any valid route not handled by "home" and "routes".
 4. Finally if all else fails onUnknownRoute is called.
Unfortunately, onUnknownRoute was not set.
When the exception was thrown, this was the stack: 
#0      _WidgetsAppState._onUnknownRoute.<anonymous closure> (package:flutter/src/widgets/app.dart:1006:9)
#1      _WidgetsAppState._onUnknownRoute (package:flutter/src/widgets/app.dart:1019:6)
#2      NavigatorState._routeNamed (package:flutter/src/widgets/navigator.dart:3153:36)
#3      NavigatorState.pushNamed (package:flutter/src/widgets/navigator.dart:3190:20)
#4      HomeWidget.build.<anonymous closure> (package:example/app/modules/home/home_widget.dart:29:20)
...
Handler: "onTap"
Recognizer: TapGestureRecognizer#1f5b9
  debugOwner: GestureDetector
  state: possible
  won arena
  finalPosition: Offset(352.0, 40.7)
  finalLocalPosition: Offset(47.3, 16.7)
  button: 1
  sent tap down
════════════════════════════════════════════════════════════════════════════════════════════════════

Same result on various combinations of:

  • Modular 1.1.2 vs. latest Git master
  • Flutter stable (1.17.0) vs. master (1.18.0-11.0.pre.10)
  • Android emulator vs. Linux desktop

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions