mirror of
https://github.com/rrousselGit/riverpod.git
synced 2025-08-26 02:10:43 +08:00

This PR adds "{@template}" to the source code of the documentation, and provides the latest Korean translation (include comments in code) of the following pages. - introduction: 2 pages - essentials: 11 pages - from_provider: 2 pages - advanced: 1 page Thanks --------- Co-authored-by: Remi Rousselet <darky12s@gmail.com>
14 lines
435 B
Dart
14 lines
435 B
Dart
// ignore_for_file: omit_local_variable_types
|
|
|
|
import 'package:flutter/widgets.dart';
|
|
import 'package:flutter_riverpod/flutter_riverpod.dart';
|
|
|
|
/* SNIPPET START */
|
|
final myProvider = ChangeNotifierProvider<ValueNotifier<int>>((ref) {
|
|
// {@template provider}
|
|
// Will listen to and dispose of the ValueNotifier.
|
|
// Widgets can then "ref.watch" this provider to listen to updates.
|
|
// {@endtemplate}
|
|
return ValueNotifier(0);
|
|
});
|