NiceRoute class

Route definition with metadata.

Constructors

NiceRoute({required String path, required Widget builder(BuildContext context, Map<String, String> params), String? name, String? title, IconData? icon, Future<bool> guard(BuildContext context)?, List<NiceRoute> children = const [], bool isPublic = false, NiceRouteTransition transition = NiceRouteTransition.fade})
const

Properties

builder Widget Function(BuildContext context, Map<String, String> params)
Widget builder for this route
final
children List<NiceRoute>
Nested child routes
final
guard Future<bool> Function(BuildContext context)?
Route guard (returns true to allow, false to block)
final
hashCode int
The hash code for this object.
no setterinherited
icon IconData?
Optional icon for navigation menus
final
isPublic bool
Whether route is accessible without authentication
final
name String?
Optional route name for programmatic navigation
final
path String
URL path pattern (e.g., '/users/:id')
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
title String?
Page title (for browser tab, navigation)
final
transition NiceRouteTransition
Transition animation type
final

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