mirror of
https://github.com/rrousselGit/riverpod.git
synced 2025-08-16 19:30:25 +08:00
15 lines
350 B
Dart
15 lines
350 B
Dart
// ignore_for_file: unused_local_variable
|
|
|
|
import 'package:riverpod_annotation/riverpod_annotation.dart';
|
|
|
|
final otherProvider = Provider<int>((ref) => 0);
|
|
|
|
/* SNIPPET START */
|
|
final provider = Provider<int>((ref) {
|
|
// "Ref" can be used here to read other providers
|
|
final otherValue = ref.watch(otherProvider);
|
|
|
|
return 0;
|
|
});
|
|
/* SNIPPET END */
|