Files
2024-10-18 18:53:24 +02:00

22 lines
455 B
Dart

// ignore_for_file: unused_local_variable
import 'package:flutter_riverpod/flutter_riverpod.dart';
import 'package:riverpod_annotation/riverpod_annotation.dart';
part 'codegen.g.dart';
@riverpod
int other(Ref ref) => 0;
/* SNIPPET START */
@riverpod
int example(Ref ref) {
// {@template provider}
// "Ref" can be used here to read other providers
// {@endtemplate}
final otherValue = ref.watch(otherProvider);
return 0;
}
/* SNIPPET END */