Riverpod class

An annotation placed on classes or functions.

This tells riverpod_generator to generate a provider out of the annotated.

By default, Riverpod will convert Futures and Streams into AsyncValues. If this is undesired, you can use Raw to have Riverpod forcibly return the raw Future/Stream instead. element.

Annotations
  • @Target({TargetKind.classType, TargetKind.function})
  • @sealed

Constructors

Riverpod({bool keepAlive = false, List<Object>? dependencies})
An annotation placed on classes or functions.
const

Properties

dependencies List<Object>?
The list of providers that this provider potentially depends on.
final
hashCode int
The hash code for this object.
no setterinherited
keepAlive bool
Whether the state of the provider should be maintained if it is no-longer used.
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