riverpod top-level constant

  1. @Target({TargetKind.classType, TargetKind.function})
Riverpod const riverpod

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.

Implementation

@Target({TargetKind.classType, TargetKind.function})
const riverpod = Riverpod();