Riverpod class final

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.new({TargetKind.classType, TargetKind.function})
  • @sealed

Constructors

Riverpod({bool keepAlive = false, List<Object>? dependencies, Duration? retry(int retryCount, Object error)?, String? name})
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
name → String?
The name of the generated provider.
final
retry → Duration? Function(int retryCount, Object error)?
The default retry logic used by providers associated to this container.
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