mirror of
https://github.com/rrousselGit/riverpod.git
synced 2025-08-15 02:06:53 +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>
22 lines
507 B
Dart
22 lines
507 B
Dart
// ignore_for_file: omit_local_variable_types, prefer_final_locals
|
|
|
|
import 'package:flutter/widgets.dart';
|
|
import 'package:flutter_riverpod/flutter_riverpod.dart';
|
|
|
|
import 'sync_definition/raw.dart';
|
|
|
|
void main() {
|
|
/* SNIPPET START */
|
|
Consumer(
|
|
builder: (context, ref, child) {
|
|
// {@template watch}
|
|
// The value is not wrapped in an "AsyncValue"
|
|
// {@endtemplate}
|
|
int value = ref.watch(synchronousExampleProvider);
|
|
|
|
return Text('$value');
|
|
},
|
|
);
|
|
/* SNIPPET END */
|
|
}
|