BloomLoader class
Annotation marking a server-side or build-time data loader for a route.
Loaders execute before rendering to fetch required data asynchronously.
Example:
@BloomLoader(revalidate: Duration(minutes: 5))
Future<PostData> loadPost(BloomRouteContext ctx) async {
return fetchPost(ctx.params['id']!);
}
Constructors
- BloomLoader({Duration? revalidate})
-
Creates a BloomLoader annotation with an optional
revalidateduration.const
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- revalidate → Duration?
-
Optional cache revalidation interval duration for SSG/ISR rendering.
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