StaticRoutePattern<T> class

Dynamic pattern expanding parameterized paths (e.g. /products/:slug) from in-memory collections, async data loaders, or JSON data files.

Implemented types

Constructors

StaticRoutePattern({String? path, String? pathPattern, dynamic items, String? dataFile, Map<String, Object?>? metadataTemplate, String slugExtractor(T item)?, String slugField = 'slug', MantleComponent componentBuilder(T item, MantleContext context)?, WebMetadata metadataBuilder(T item)?})
const
StaticRoutePattern.fromJson(Map<String, Object?> json)
factory

Properties

componentBuilder → MantleComponent Function(T item, MantleContext context)?
final
dataFile → String?
final
hashCode → int
The hash code for this object.
no setterinherited
items → dynamic
final
metadataBuilder → WebMetadata Function(T item)?
final
metadataTemplate → Map<String, Object?>?
final
path → String
final
pathPattern → String
Backward-compatible alias for path.
no setter
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
slugExtractor → String Function(T item)?
final
slugField → String
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
resolve([MantleContext? context]) → Future<List<StaticPageRoute>>
override
toString() → String
A string representation of this object.
inherited

Operators

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