vader_app library

Classes

Allow
Allows the navigation to proceed.
Alphabet
A collection of useful alphabets that can be used to generate ids.
AppSettings
Assert
A decorator that allows adding assert(...) on the generated classes.
BackButtonHandler
BackButtonInterceptor
When you need to intercept the Android back-button, you usually add WillPopScope to your widget tree. However, under some use cases, specially when developing stateful widgets that interact with the back button, it's more convenient to use the BackButtonInterceptor.
Bloc<Event, State>
Takes a Stream of Events as input and transforms them into a Stream of States as output.
BlocBase<State>
An interface for the core functionality implemented by both Bloc and Cubit.
BlocBuilder<B extends StateStreamable<S>, S>
BlocBuilder handles building a widget in response to new states. BlocBuilder is analogous to StreamBuilder but has simplified API to reduce the amount of boilerplate code needed as well as bloc-specific performance improvements. Please refer to BlocListener if you want to "do" anything in response to state changes such as navigation, showing a dialog, etc...
BlocBuilderBase<B extends StateStreamable<S>, S>
Base class for widgets that build themselves based on interaction with a specified bloc.
BlocConsumer<B extends StateStreamable<S>, S>
BlocConsumer exposes a builder and listener in order react to new states. BlocConsumer is analogous to a nested BlocListener and BlocBuilder but reduces the amount of boilerplate needed. BlocConsumer should only be used when it is necessary to both rebuild UI and execute other reactions to state changes in the bloc.
BlocEventSink<Event extends Object?>
An ErrorSink that supports adding events.
Block
Blocks the navigation from proceeding.
BlocListener<B extends StateStreamable<S>, S>
Takes a BlocWidgetListener and an optional bloc and invokes the listener in response to state changes in the bloc. It should be used for functionality that needs to occur only in response to a state change such as navigation, showing a SnackBar, showing a Dialog, etc... The listener is guaranteed to only be called once for each state change unlike the builder in BlocBuilder.
BlocListenerBase<B extends StateStreamable<S>, S>
Base class for widgets that listen to state changes in a specified bloc.
BlocObserver
An interface for observing the behavior of Bloc instances.
BlocProvider<T extends StateStreamableSource<Object?>>
Takes a create function that is responsible for creating the Bloc or Cubit and a child which will have access to the instance via BlocProvider.of(context). It is used as a dependency injection (DI) widget so that a single instance of a Bloc or Cubit can be provided to multiple widgets within a subtree.
BlocSelector<B extends StateStreamable<S>, S, T>
BlocSelector is analogous to BlocBuilder but allows developers to filter updates by selecting a new value based on the bloc state. Unnecessary builds are prevented if the selected value does not change.
BrowserConfiguration
Additional configuration options for LaunchMode.inAppBrowserView
BytesLoader
An interface that can be implemented to support decoding vector graphic binary assets from different byte sources.
Cache
The cache for decoded SVGs.
Change<State>
A Change represents the change from one State to another. A Change consists of the currentState and nextState.
Closable
An object that must be closed when no longer in use.
ColorMapper
A class that transforms from one color to another during SVG parsing.
Constants
Cubit<State>
A Cubit is similar to Bloc but has no notion of events and relies on methods to emit new states.
CustomParameterCodec
annotation to define a custom parameter decoder/encoder this is useful when the is encoded/decoded in a non-standard way like base64Url this must be used as an annotation on a field
CustomTransitionPage<T>
Page with custom transition functionality.
DeepCollectionEquality
Deep equality on collections.
Default
Allows passing default values to a constructor:
DefaultSvgTheme
The SVG theme to apply to descendant SvgPicture widgets which don't have explicit theme values.
DesignColor
Emittable<State extends Object?>
An object that can emit new states.
EmittableStateStreamableSource<State>
A StateStreamableSource that can emit new states.
Emitter<State>
An Emitter is a class which is capable of emitting new states.
EqualUnmodifiableListView<T>
An UnmodifiableListView which overrides ==
EqualUnmodifiableMapView<Key, Value>
An UnmodifiableMapView which overrides ==
EqualUnmodifiableSetView<T>
An UnmodifiableSetView which overrides ==
ErrorSink
A generic destination for errors.
Expectation<T>
A captured method or property accessor -> a function that returns a value.
Fake
A stand-in for another object which cannot be used except for specifically overridden methods.
Freezed
Flags a class as needing to be processed by Freezed and allows passing options.
FreezedMapOptions
Options for enabling/disabling specific Union.map features;
FreezedUnionValue
An annotation used to specify how a union type will be serialized.
FreezedWhenOptions
Options for enabling/disabling specific Union.when features;
GoRoute Get started Configuration Redirection Transition animations Named routes
A route that is displayed visually above the matching parent route using the Navigator.
GoRouteData Type-safe routes
A class to represent a GoRoute in Type-safe routing.
GoRouteInformationParser
Converts between incoming URLs and a RouteMatchList using RouteMatcher.
GoRouteInformationProvider
The RouteInformationProvider created by go_router.
GoRouter Get started Upgrading Configuration Navigation Redirection Web Deep linking Named routes Error handling State restoration
The route configuration for the app.
GoRouterDelegate
GoRouter implementation of RouterDelegate.
GoRouterState
The route state during routing.
HttpClient
HttpClientMock
HttpResponse
Immutable
Used to annotate a class.
ImperativeRouteMatch
The route match that represent route pushed through GoRouter.push.
Implements<T extends Object?>
Marks a union type to implement the interface stringType or type T. In the case below City will implement AdministrativeArea<House>.
InheritedGoRouter
GoRouter implementation of InheritedWidget.
Injector
InterceptorResult
InterceptorResults
JsonConverter<T, S>
Implement this class to provide custom converters for a specific Type.
JsonEnum
Allows configuration of how enum elements are treated as JSON.
JsonKey
An annotation used to specify how a field is serialized.
JsonLiteral
An annotation used to generate a private field containing the contents of a JSON file.
JsonSerializable
An annotation used to specify a class to generate code for.
JsonValue
An annotation used to specify how a enum value is serialized.
Localization
Logger
LoggerObserver
Mock
Extend or mixin this class to mark the implementation as a Mock.
MockInjector
MultiBlocListener
Merges multiple BlocListener widgets into one widget tree.
MultiBlocObserver
A BlocObserver which supports registering multiple BlocObserver instances. This is useful when maintaining multiple BlocObserver instances for different functions e.g. LoggingBlocObserver, ErrorReportingBlocObserver.
MultiBlocProvider
Merges multiple BlocProvider widgets into one widget tree.
MultiRepositoryProvider
Merges multiple RepositoryProvider widgets into one widget tree.
NoTransitionPage<T>
Custom transition page with no transition.
OnEnterResult
The result of an onEnter callback.
Permission
Defines the permissions which can be checked and requested.
PermissionWithService
A special kind of permission, used to access a service.
PictureInfo
The deocded result of a vector graphics asset.
PictureProvider
Deprecated class, will be removed, does not do anything.
RecordUse
Annotates a static method to be recorded.
RelativeGoRouteData Type-safe routes
A class to represent a relative GoRoute in Type-safe routing.
Repository
RepositoryProvider<T>
Takes a create function that is responsible for creating the repository and a child which will have access to the repository via RepositoryProvider.of(context). It is used as a dependency injection (DI) widget so that a single instance of a repository can be provided to multiple widgets within a subtree.
Required
Used to annotate a named parameter p in a method or function f.
RouteBase
The base class for GoRoute and ShellRoute.
RouteBuilder
Builds the top-level Navigator for GoRouter.
RouteConfiguration
The route configuration for GoRouter configured by the app.
RouteData
Baseclass for supporting Type-safe routing.
RouteInfo
Your functions can also process information about routes by using the function's RouteInfo info parameter. To get the current route in the navigator, call info.currentRoute(context). Also, info.routeWhenAdded contains the route that was the current one when the interceptor was added through the BackButtonInterceptor.add() method.
RouteInformationState<T>
The data class to be stored in RouteInformation.state to be used by GoRouteInformationParser.
RouteMatch
An matched result by matching a GoRoute against a location.
RouteMatchBase
The base class for various route matches.
RouteMatchList
The list of RouteMatchBase objects.
RoutingConfig Configuration
A set of parameters that defines routing in GoRouter.
Settings
SettingsProvider
ShellRoute Configuration
A route that displays a UI shell around the matching child route.
ShellRouteBase
Base class for classes that act as shells for sub-routes, such as ShellRoute and StatefulShellRoute.
ShellRouteContext
Context object used when building the shell and Navigator for a shell route.
ShellRouteData
A class to represent a ShellRoute in Type-safe routing.
ShellRouteMatch
An matched result by matching a ShellRoute against a location.
SplashView
StatefulNavigationShell
Widget for managing the state of a StatefulShellRoute.
StatefulNavigationShellState
State for StatefulNavigationShell.
StatefulShellBranch
Representation of a separate branch in a stateful navigation tree, used to configure StatefulShellRoute.
StatefulShellBranchData
Base class for supporting StatefulShellRoute
StatefulShellRoute Configuration
A route that displays a UI shell with separate Navigators for its sub-routes.
StatefulShellRouteData
Base class for supporting StatefulShellRoute
StateStreamable<State>
A Streamable that provides synchronous access to the current state.
StateStreamableSource<State>
A StateStreamable that must be closed when no longer in use.
StorageClient
StorageClientMock
StoreKeys
Streamable<State extends Object?>
An object that provides access to a stream of states over time.
Svg
A utility class for decoding SVG data to a DrawableRoot or a PictureInfo.
SvgAssetLoader
A BytesLoader that decodes and parses an SVG asset in an isolate and creates a vector_graphics binary representation.
SvgBytesLoader
A BytesLoader that decodes and parses a UTF-8 encoded SVG string from a Uint8List in an isolate and creates a vector_graphics binary representation.
SvgCacheKey
A SvgTheme aware cache key.
SvgFileLoader
A BytesLoader that decodes SVG data from a file in an isolate and creates a vector_graphics binary representation.
SvgLoader<T>
A BytesLoader that parses a SVG data in an isolate and creates a vector_graphics binary representation.
SvgNetworkLoader
A BytesLoader that decodes and parses a UTF-8 encoded SVG string the network in an isolate and creates a vector_graphics binary representation.
SvgPicture
A widget that will parse SVG data for rendering on screen.
SvgStringLoader
A BytesLoader that parses an SVG string in an isolate and creates a vector_graphics binary representation.
SvgTheme
A theme used when decoding an SVG picture.
Transition<Event, State>
A Transition is the change from one state to another. Consists of the currentState, an event, and the nextState.
TypedGoRoute<T extends GoRouteData>
A superclass for each typed go route descendant
TypedRelativeGoRoute<T extends RelativeGoRouteData>
A superclass for each typed relative go route descendant
TypedRoute<T extends RouteData>
A superclass for each typed route descendant
TypedShellRoute<T extends ShellRouteData>
A superclass for each typed shell route descendant
TypedStatefulShellBranch<T extends StatefulShellBranchData>
A superclass for each typed shell route descendant
TypedStatefulShellRoute<T extends StatefulShellRouteData>
A superclass for each typed shell route descendant
Ulid
Lexicographically sortable, 128-bit identifier (UUID) with 48-bit timestamp and 80 random bits. Canonically encoded as a 26 character string, as opposed to the 36 character UUID.
UseResult
See useResult for more details.
Uuid
uuid for Dart Author: Yulian Kuncheff Released under MIT License.
UuidValue
VaderApp
VaderAppTester
VaderEntity
VaderModule
VaderTheme
VectorGraphicUtilities
Utility functionality for interaction with vector graphic assets.
VerificationResult
Information about a stub call verification.
WebViewConfiguration
Additional configuration options for LaunchMode.inAppWebView.
When<T>
Result of when which enables methods to be stubbed via
With<T extends Object?>
Marks a union type to mixin the interface stringType or type T. In the case below City will mixin with AdministrativeArea<House>.

Enums

AppSettingsPanelType
This enum defines the different setting panel types for Android Settings Panels.
AppSettingsType
This enum defines the different setting types.
FieldRename
Values for the automatic field renaming behavior for JsonSerializable.
FreezedUnionCase
Options for automatic union values renaming.
HttpMethod
HttpResponseType
LaunchMode
The desired mode to launch a URL.
LogLevel
Level of logs to segmentation and control logging output
Namespace
RFC4122 & RFC9562 provided namespaces for v3, v5, and v8 namespace based UUIDs
The type of the navigation.
PermissionStatus
Defines the state of a Permission.
ServiceStatus
Defines the different states a service can be in.
StorageDirectory
Corresponds to constants defined in Androids android.os.Environment class.
StorageKey
ValidationMode
The options for UUID Validation strictness

Extensions

FuturePermissionStatusGetters on Future<PermissionStatus>
Utility getter extensions for the Future<PermissionStatus> type.
FutureServiceStatusGetters on Future<ServiceStatus>
Utility getter extensions for the Future<ServiceStatus> type.
GoRouterHelper on BuildContext
Dart extension to add navigation function to a BuildContext object, e.g. context.go('/');
ListOfVerificationResult on List<VerificationResult>
Returns the list of argument lists which were captured within verifyInOrder.
PermissionActions on Permission
Actions that can be executed on a permission.
PermissionCheckShortcuts on Permission
Shortcuts for checking the status of a Permission.
PermissionListActions on List<Permission>
Actions that can be taken on a List of Permissions.
PermissionStatusGetters on PermissionStatus
Utility getter extensions for the PermissionStatus type.
ReadContext on BuildContext
Exposes the read method.
SelectContext on BuildContext
Adds a select method on BuildContext.
ServicePermissionActions on PermissionWithService
Actions that apply only to permissions that have an associated service.
ServiceStatusGetters on ServiceStatus
Utility getter extensions for the ServiceStatus type.
TextStyleCopyWith on TextStyle
WatchContext on BuildContext
Exposes the watch method.

Constants

alwaysThrows → const _AlwaysThrows
Used to annotate a function f. Indicates that f always throws an exception. Any functions that override f, in class inheritance, are also expected to conform to this contract.
awaitNotRequired → const _AwaitNotRequired
Used to annotate a Future-returning function (including constructors, getters, methods, and operators), or a Future-typed field (including top-level, instance, and static) f. Indicates that the Future value that f returns does not need to be awaited. Any methods that override f in class inheritance, are also expected to conform to this contract.
checked → const _Checked
Used to annotate a parameter of an instance method that overrides another method.
doNotStore → const _DoNotStore
Used to annotate a method, getter, top-level function, or top-level getter to indicate that the value obtained by invoking it should not be stored in a field or top-level variable. The annotation can also be applied to a class to implicitly annotate all of the valid members of the class, or applied to a library to annotate all of the valid members of the library, including classes. If a value returned by an element marked as doNotStore is returned from a function or getter, that function or getter should be similarly annotated.
doNotSubmit → const _DoNotSubmit
Used to annotate an optional parameter, method, getter or top-level getter or function that is not intended to be accessed in checked-in code, but might be ephemerally used during development or local testing.
experimental → const _Experimental
Used to annotate a library, or any declaration that is part of the public interface of a library (such as top-level members, class members, and function parameters) to indicate that the annotated API is experimental and may be removed or changed at any-time without updating the version of the containing package, despite the fact that it would otherwise be a breaking change.
factory → const _Factory
Used to annotate an instance or static method m. Indicates that m must either be abstract or must return a newly allocated object or null. In addition, every method that either implements or overrides m is implicitly annotated with this same annotation.
freezed → const Freezed
Defines an immutable data-class.
immutable → const Immutable
Used to annotate a class C. Indicates that C and all subtypes of C must be immutable.
internal → const _Internal
Used to annotate a declaration which should only be used from within the package in which it is declared, and which should not be exposed from said package's public API.
isTest → const _IsTest
Used to annotate a test framework function that runs a single test.
isTestGroup → const _IsTestGroup
Used to annotate a test framework function that runs a group of tests.
literal → const _Literal
Used to annotate a const constructor c. Indicates that any invocation of the constructor must use the keyword const unless one or more of the arguments to the constructor is not a compile-time constant.
mustBeConst → const _MustBeConst
Used to annotate a parameter which should be constant.
mustBeOverridden → const _MustBeOverridden
Used to annotate an instance member m declared on a class or mixin C. Indicates that every concrete subclass of C must directly override m.
mustCallSuper → const _MustCallSuper
Used to annotate an instance member (method, getter, setter, operator, or field) m. Indicates that every invocation of a member that overrides m must also invoke m. In addition, every method that overrides m is implicitly annotated with this same annotation.
nonVirtual → const _NonVirtual
Used to annotate an instance member (method, getter, setter, operator, or field) m in a class C or mixin M. Indicates that m should not be overridden in any classes that extend or mixin C or M.
optionalTypeArgs → const _OptionalTypeArgs
Used to annotate a class, mixin, extension, function, method, or typedef declaration C. Indicates that any type arguments declared on C are to be treated as optional.
protected → const _Protected
Used to annotate an instance member in a class or mixin which is meant to be visible only within the declaring library, and to other instance members of the class or mixin, and their subtypes.
redeclare → const _Redeclare
Used to annotate an instance member of an extension type that redeclares a member from a superinterface.
reopen → const _Reopen
Annotation for intentionally loosening restrictions on subtyping that would otherwise cause lint warnings to be produced by the implicit_reopen lint.
required → const Required
Used to annotate a named parameter p in a method or function f. Indicates that every invocation of f must include an argument corresponding to p, despite the fact that p would otherwise be an optional parameter.
sealed → const _Sealed
Annotation marking a class as not allowed as a super-type outside of the current package.
unfreezed → const Freezed
Defines a potentially mutable data-class.
useResult → const UseResult
Used to annotate a method, field, or getter within a class, mixin, or extension, or a or top-level getter, variable or function to indicate that the value obtained by invoking it should be used. A value is considered used if it is assigned to a variable, passed to a function, or used as the target of an invocation, or invoked (if the result is itself a function).
vg → const VectorGraphicUtilities
The VectorGraphicUtilities instance.
virtual → const _Virtual
Used to annotate a field that is allowed to be overridden in Strong Mode.
visibleForOverriding → const _VisibleForOverriding
Used to annotate an instance member that was made public so that it could be overridden but that is not intended to be referenced from outside the defining library.
visibleForTesting → const _VisibleForTesting
Used to annotate a declaration that was made public, so that it is more visible than otherwise necessary, to make code testable.

Properties

disablePathProviderPlatformOverride bool
no getter
injector Injector
final
logger Logger
final
final
svg Svg
Instance for Svg's utility methods, which can produce a DrawableRoot or PictureInfo from String or Uint8List.
final
untilCalled Future<Invocation> Function<T>(T _())
Returns a future Invocation that will complete upon the first occurrence of the given invocation.
no setter
verify Verify
Verify that a method on a mock object was called with the given arguments.
no setter
verifyInOrder List<VerificationResult> Function<T>(List<T Function()> recordedInvocations)
Verifies that a list of methods on a mock object have been called with the given arguments. For example:
no setter
verifyNever Verify
Verify that a method on a mock object was never called with the given arguments.
no setter
when When<T> Function<T>(T x())
Create a stub method response.
no setter

Functions

$checkedConvert<T>(Map map, String key, T castFunc(dynamic), {Object? readValue(Map, String)?}) → T
Helper function used in generated code when JsonSerializableGenerator.checked is true.
$checkedCreate<T>(String className, Map map, T constructor(S <S>(String, S (Object?), {Object? readValue(Map, String)?})), {Map<String, String> fieldKeyMap = const {}}) → T
Helper function used in generated code when JsonSerializableGenerator.checked is true.
$checkedNew<T>(String className, Map map, T constructor(), {Map<String, String>? fieldKeyMap}) → T
Helper function used in generated code when JsonSerializableGenerator.checked is true.
$checkKeys(Map map, {List<String>? allowedKeys, List<String>? requiredKeys, List<String>? disallowNullValues}) → void
Helper function used in generated fromJson code when JsonSerializable.disallowUnrecognizedKeys is true for an annotated type or JsonKey.required is true for any annotated fields.
$enumDecode<K extends Enum, V>(Map<K, V> enumValues, Object? source, {K? unknownValue}) → K
Returns the key associated with value source from enumValues, if one exists.
$enumDecodeNullable<K extends Enum, V>(Map<K, V> enumValues, Object? source, {Enum? unknownValue}) → K?
Returns the key associated with value source from enumValues, if one exists.
any<T>({String? named, Matcher? that}) → T
An argument matcher that matches any argument passed in.
canLaunch(String urlString) Future<bool>
Checks whether the specified URL can be handled by some app installed on the device.
canLaunchUrl(Uri url) Future<bool>
Checks whether the specified URL can be handled by some app installed on the device.
captureAny<T>({String? named, Matcher? that}) → T
An argument matcher that captures any argument passed in.
clearInteractions(dynamic mock) → void
Clear the collected interactions with mock.
closeInAppWebView() Future<void>
Closes the current in-app web view, if one was previously opened by launchUrl.
closeWebView() Future<void>
Closes the current WebView, if one was previously opened via a call to launch.
getApplicationCacheDirectory() Future<Directory>
Path to a directory where the application may place application-specific cache files.
getApplicationDocumentsDirectory() Future<Directory>
Path to a directory where the application may place data that is user-generated, or that cannot otherwise be recreated by your application.
getApplicationSupportDirectory() Future<Directory>
Path to a directory where the application may place application support files.
getDownloadsDirectory() Future<Directory?>
Path to the directory where downloaded files can be stored.
getExternalCacheDirectories() Future<List<Directory>?>
Paths to directories where application specific cache data can be stored externally.
getExternalStorageDirectories({StorageDirectory? type}) Future<List<Directory>?>
Paths to directories where application specific data can be stored externally.
getExternalStorageDirectory() Future<Directory?>
Path to a directory where the application may access top level storage.
getLibraryDirectory() Future<Directory>
Path to the directory where application can store files that are persistent, backed up, and not visible to the user, such as sqlite.db.
getTemporaryDirectory() Future<Directory>
Path to the temporary directory on the device that is not backed up and is suitable for storing caches of downloaded files.
goldenTestPathBuilder(dynamic c) String
launch(String urlString, {bool? forceSafariVC, bool forceWebView = false, bool enableJavaScript = false, bool enableDomStorage = false, bool universalLinksOnly = false, Map<String, String> headers = const <String, String>{}, Brightness? statusBarBrightness, String? webOnlyWindowName}) Future<bool>
Parses the specified URL string and delegates handling of it to the underlying platform.
launchUrl(Uri url, {LaunchMode mode = LaunchMode.platformDefault, WebViewConfiguration webViewConfiguration = const WebViewConfiguration(), BrowserConfiguration browserConfiguration = const BrowserConfiguration(), String? webOnlyWindowName}) Future<bool>
Passes url to the underlying platform for handling.
logInvocations(List<Mock> mocks) → void
Print all collected invocations of any mock methods of mocks.
nanoid({int length = 21, String? alphabet, Random? random}) String
This generator function create a tiny, secure, URL-friendly, unique string ID
openAppSettings() Future<bool>
Opens the app settings page.
registerFallbackValue(dynamic value) → void
Allows any and captureAny to be used on parameters of type value.
reset(dynamic mock) → void
Clear stubs of, and collected interactions with mock.
resetMocktailState() → void
Reset the state of Mocktail, typically for use between tests.
sandbox(Function function, {LogLevel logLevel = LogLevel.debug, bool enableStopwatch = true}) Future<void>
supportsCloseForLaunchMode(LaunchMode mode) Future<bool>
Returns true if closeInAppWebView is supported for mode in the current platform implementation.
supportsLaunchMode(LaunchMode mode) Future<bool>
Returns true if mode is supported by the current platform implementation.
throwOnMissingStub(Mock mock, {void exceptionBuilder(Invocation)?}) → void
Opt-into Mock throwing NoSuchMethodError for unimplemented methods.
verifyNoMoreInteractions(dynamic mock) → void
Ensure no redundant invocations occur.
verifyZeroInteractions(dynamic mock) → void
Ensure interactions never happened on a mock.

Typedefs

Answer<T> = T Function(Invocation invocation)
Returns a value dependent on the details of an invocation.
BlocBuilderCondition<S> = bool Function(S previous, S current)
Signature for the buildWhen function which takes the previous state and the current state and is responsible for returning a bool which determines whether to rebuild BlocBuilder with the current state.
BlocListenerCondition<S> = bool Function(S previous, S current)
Signature for the listenWhen function which takes the previous state and the current state and is responsible for returning a bool which determines whether or not to call BlocWidgetListener of BlocListener with the current state.
BlocWidgetBuilder<S> = Widget Function(BuildContext context, S state)
Signature for the builder function which takes the BuildContext and state and is responsible for returning a widget which is to be rendered. This is analogous to the builder function in StreamBuilder.
BlocWidgetListener<S> = void Function(BuildContext context, S state)
Signature for the listener function which takes the BuildContext along with the state and is responsible for executing in response to state changes.
BlocWidgetSelector<S, T> = T Function(S state)
Signature for the selector function which is responsible for returning a selected value, T, based on state.
EventHandler<Event, State> = FutureOr<void> Function(Event event, Emitter<State> emit)
An event handler is responsible for reacting to an incoming Event and can emit zero or more states via the Emitter.
EventMapper<Event> = Stream<Event> Function(Event event)
Signature for a function which converts an incoming event into an outbound stream of events. Used when defining custom EventTransformers.
EventTransformer<Event> = Stream<Event> Function(Stream<Event> events, EventMapper<Event> mapper)
Used to change how events are processed. By default events are processed concurrently.
ExitCallback = FutureOr<bool> Function(BuildContext context, GoRouterState state)
Signature for function used in RouteBase.onExit.
GoExceptionHandler = void Function(BuildContext context, GoRouterState state, GoRouter router)
The function signature of GoRouter.onException.
GoRouterBuilderWithNav = Widget Function(BuildContext context, Widget child)
Signature of a go router builder function with navigator.
GoRouterPageBuilder = Page Function(BuildContext context, GoRouterState state)
The page builder for GoRoute.
GoRouterRedirect = FutureOr<String?> Function(BuildContext context, GoRouterState state)
The signature of the redirect callback.
GoRouterWidgetBuilder = Widget Function(BuildContext context, GoRouterState state)
The widget builder for GoRoute.
InterceptorFunction = FutureOr<bool> Function(bool stopDefaultButtonEvent, RouteInfo routeInfo)
The function signature for navigation callbacks in _OnEnterHandler.
Signature for functions used to build Navigators
OnEnter = FutureOr<OnEnterResult> Function(BuildContext context, GoRouterState currentState, GoRouterState nextState, GoRouter goRouter)
The signature for the top-level onEnter callback.
OnEnterThenCallback = FutureOr<void> Function()
Signature for callbacks invoked after an OnEnterResult is resolved.
ParserExceptionHandler = RouteMatchList Function(BuildContext context, RouteMatchList routeMatchList)
The function signature of GoRouteInformationParser.onParserException.
PopPageWithRouteMatchCallback = bool Function(Route route, dynamic result, RouteMatchBase match)
Signature for a function that takes in a route to be popped with the result and returns a boolean decision on whether the pop is successful.
RouteInfoState = RouteInformationState
Type alias for route information state with dynamic type parameter.
RouteMatchVisitor = bool Function(RouteMatchBase)
The function signature for RouteMatchList.visitRouteMatches
ShellNavigationContainerBuilder = Widget Function(BuildContext context, StatefulNavigationShell navigationShell, List<Widget> children)
Builder for a custom container for the branch Navigators of a StatefulShellRoute.
ShellRouteBuilder = Widget Function(BuildContext context, GoRouterState state, Widget child)
The widget builder for ShellRoute.
ShellRoutePageBuilder = Page Function(BuildContext context, GoRouterState state, Widget child)
The page builder for ShellRoute.
StatefulShellRouteBuilder = Widget Function(BuildContext context, GoRouterState state, StatefulNavigationShell navigationShell)
The widget builder for StatefulShellRoute.
StatefulShellRoutePageBuilder = Page Function(BuildContext context, GoRouterState state, StatefulNavigationShell navigationShell)
The page builder for StatefulShellRoute.
SvgErrorWidgetBuilder = Widget Function(BuildContext context, Object error, StackTrace stackTrace)
Builder function to create an error widget. This builder is called when the image failed loading.
Verify = VerificationResult Function<T>(T matchingInvocations())
Type definition for the object returned when invoking verify.

Exceptions / Errors

AccessDeniedException
BadKeyException
A base class for exceptions thrown when decoding JSON.
CheckedFromJsonException
Exception thrown if there is a runtime exception in fromJson code generated when JsonSerializableGenerator.checked is true
DisallowedNullValueException
Exception thrown if there are keys with disallowed null values in a JSON map that was provided during deserialization.
GoError
Thrown when GoRouter is used incorrectly.
GoException
Thrown when GoRouter can not handle a user request.
InternetConnectionException
MissingPlatformDirectoryException
An exception thrown when a directory that should always be available on the current platform cannot be obtained.
MissingRequiredKeysException
Exception thrown if there are missing required keys in a JSON map that was provided during deserialization.
MissingStubError
An error which is thrown when no stub is found which matches the arguments of a real method call on a mock object.
ParseDataException
ProviderNotFoundException
The error that will be thrown if Provider.of fails to find a Provider as an ancestor of the BuildContext used.
ServerException
UnrecognizedKeysException
Exception thrown if there are unrecognized keys in a JSON map that was provided during deserialization.