mirror of
https://github.com/rrousselGit/riverpod.git
synced 2025-08-16 02:43:05 +08:00
19 lines
364 B
Dart
19 lines
364 B
Dart
// ignore_for_file: unused_local_variable
|
|
|
|
import 'package:riverpod_annotation/riverpod_annotation.dart';
|
|
|
|
part 'codegen.g.dart';
|
|
|
|
@riverpod
|
|
int other(OtherRef ref) => 0;
|
|
|
|
/* SNIPPET START */
|
|
@riverpod
|
|
int example(ExampleRef ref) {
|
|
// "Ref" can be used here to read other providers
|
|
final otherValue = ref.watch(otherProvider);
|
|
|
|
return 0;
|
|
}
|
|
/* SNIPPET END */
|