Giter VIP home page Giter VIP logo

Comments (3)

darshankawar avatar darshankawar commented on June 21, 2024

@stan-at-work
Can you provide a runnable reproducible code sample that triggers this exception ?

from flutter.

stan-at-work avatar stan-at-work commented on June 21, 2024

@stan-at-work Can you provide a runnable reproducible code sample that triggers this exception ?

Sure, i will create an application. should be done in a couple of days

from flutter.

marceloadsj avatar marceloadsj commented on June 21, 2024

It looks like apps created with Material.router(...) method falls into this condition inside WidgetsApp:

https://github.com/flutter/flutter/blob/master/packages/flutter/lib/src/widgets/app.dart#L1673
Navigator (which builds the Overlay) is created on the "else" statement only...

Then, inside the router delegator, we read this statement: https://github.com/flutter/flutter/blob/master/packages/flutter/lib/src/widgets/router.dart#L1259
Which makes me think that the router delegate expects a Navigator, but it's not mandatory (hence the words "...typically a [Navigator]...").

After saying this, I don't know if it's a Flutter problem (eg: lack of enforcing the RouteDelegator to provide a real Navigator) or a problem of other packages (eg: GoRouter, which implements their own RouterDelegate + _CustomNavigator without rendering a Overlay)
https://github.com/flutter/packages/blob/main/packages/go_router/lib/src/delegate.dart#L18
https://github.com/flutter/packages/blob/main/packages/go_router/lib/src/builder.dart#L126

PS: I am not sure if that's the root cause of the issue btw. I just shared what I could find hehe.

As a workaround for me atm, I am building an overlay via the MaterialApp.router(builder: ...) property.

from flutter.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.