AutoRouterConfig class

Classes annotated with AutoRouteConfig will generate an abstract class that extends RootStackRouter that can be extended by the annotated class to be used as the RootRouter of the App

Annotations
  • @Target({TargetKind.classType})

Constructors

AutoRouterConfig({String? replaceInRouteName = 'Page|Screen,Route', bool deferredLoading = false, List<String> generateForDir = const ['lib'], List<Type>? modules})
default constructor
const
AutoRouterConfig.module({String? replaceInRouteName = 'Page|Screen,Route', bool deferredLoading = false, List<String> generateForDir = const ['lib']})
default constructor
const

Properties

deferredLoading bool
Use for web for lazy loading other routes more info https://dart.dev/guides/language/language-tour#deferred-loading defaults to false
final
generateForDir List<String>
Only generated files exist in provided directories will be processed defaults = const 'lib'
final
hashCode int
The hash code for this object.
no setterinherited
modules List<Type>?
A List of modules to be added to the RootRouter.
final
replaceInRouteName String?
Auto generated route names can be a bit long with the Route suffix e.g ProductDetailsPage would be ProductDetailsPageRoute
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

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