BasicRouter class

Very minimalistic hash based router. Just define your routes like this:

routeBuilder: (route) {
    switch (route) {
      case '/':
         return TodoListPage();
      default:
        return NotFoundPage();
   }
},
Inheritance

Constructors

BasicRouter({required Widget routeBuilder(String), String? initialRoute})

Properties

hashCode int
The hash code for this object.
no setterinherited
initialRoute String?
final
key Key?
finalinherited
routeBuilder Widget Function(String)
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

createState() StateWidget<StatefulWidget>
override
inflate(BuildContext context) → void
Set this widget context, build it’s child, and render the widget, updating Context.element When overriding pay attention that inflate need to call build and render
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
render(BuildContext context) Element
Render the DOM element and add it to the context.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited