Skip to content

Commit

Permalink
Fix documentation comment of AsyncValue.guard()
Browse files Browse the repository at this point in the history
  • Loading branch information
mono0926 authored Sep 18, 2020
1 parent 8d66a56 commit 35c07ee
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/riverpod/lib/src/common.dart
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ abstract class AsyncValue<T> with _$AsyncValue<T> {
///
///
/// ```dart
/// class MyNotifier extends StateNotifier<AsyncValue<MyData> {
/// class MyNotifier extends StateNotifier<AsyncValue<MyData>> {
/// MyNotifier(): super(const AsyncValue.loading()) {
/// _fetchData();
/// }
Expand All @@ -113,7 +113,7 @@ abstract class AsyncValue<T> with _$AsyncValue<T> {
/// // does the try/catch for us like previously
/// state = await AsyncValue.guard(() async {
/// final response = await dio.get('my_api/data');
/// final data = Data.fromJson(response);
/// return Data.fromJson(response);
/// });
/// }
/// }
Expand Down

0 comments on commit 35c07ee

Please sign in to comment.