From 6e5cb572a82b37dffa2f2611e45a71418a3ec068 Mon Sep 17 00:00:00 2001 From: Ryan Date: Tue, 21 Apr 2020 21:01:55 -0400 Subject: [PATCH] fix: bad documentation --- README.md | 14 +++++++------- packages/remote_state/README.md | 14 +++++++------- packages/remote_state/lib/remote_state.dart | 8 ++++---- 3 files changed, 18 insertions(+), 18 deletions(-) diff --git a/README.md b/README.md index ba09b58..1a7acd9 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# RemoteData +# RemoteState ![Build & test](https://github.com/chimon2000/remote_state/workflows/Build%20&%20test/badge.svg) [![codecov](https://codecov.io/gh/chimon2000/remote_state/branch/master/graph/badge.svg)](https://codecov.io/gh/chimon2000/remote_state) @@ -28,7 +28,7 @@ Instead of using a complex object we use a single data type to express all possi ## Usage -A common use case for RemoteData would be mapping it into a UI transition or component state. Here is an example that uses [StateNotifier](https://pub.dev/documentation/state_notifier/latest/state_notifier/StateNotifier-class.html), found in [examples/counter_state_notifier](https://github.com/chimon2000/remote_state/blob/master/examples/counter_state_notifier) +A common use case for RemoteState would be mapping it into a UI transition or component state. Here is an example that uses [StateNotifier](https://pub.dev/documentation/state_notifier/latest/state_notifier/StateNotifier-class.html), found in [examples/counter_state_notifier](https://github.com/chimon2000/remote_state/blob/master/examples/counter_state_notifier) ### [counter/notifier/counter.dart](https://github.com/chimon2000/remote_state/blob/master/examples/counter_state_notifier/lib/counter/notifier/counter.dart) @@ -142,23 +142,23 @@ class HomePage extends StatelessWidget { ### RemoteState.initial -`RemoteState.initial` is an instance of RemoteData that signifies the request hasn't been made yet. +`RemoteState.initial` is an instance of RemoteState that signifies the request hasn't been made yet. ### RemoteState.loading -`RemoteState.loading` is an instance of RemoteData that signifies the request has been made, but it hasn't returned any data yet. +`RemoteState.loading` is an instance of RemoteState that signifies the request has been made, but it hasn't returned any data yet. ### RemoteState.success -`RemoteState.success` is an instance of RemoteData that signifies the request has completed successfully and the new data (of type T) is available. +`RemoteState.success` is an instance of RemoteState that signifies the request has completed successfully and the new data (of type T) is available. ### RemoteState.empty -`RemoteState.success` is an instance of RemoteData that signifies the has completed successfully with an empty response. +`RemoteState.success` is an instance of RemoteState that signifies the has completed successfully with an empty response. ### RemoteState.error -`RemoteState.error` is an instance of RemoteData that signifies the request has failed. +`RemoteState.error` is an instance of RemoteState that signifies the request has failed. ## Pattern matching high order functions diff --git a/packages/remote_state/README.md b/packages/remote_state/README.md index ba09b58..1a7acd9 100644 --- a/packages/remote_state/README.md +++ b/packages/remote_state/README.md @@ -1,4 +1,4 @@ -# RemoteData +# RemoteState ![Build & test](https://github.com/chimon2000/remote_state/workflows/Build%20&%20test/badge.svg) [![codecov](https://codecov.io/gh/chimon2000/remote_state/branch/master/graph/badge.svg)](https://codecov.io/gh/chimon2000/remote_state) @@ -28,7 +28,7 @@ Instead of using a complex object we use a single data type to express all possi ## Usage -A common use case for RemoteData would be mapping it into a UI transition or component state. Here is an example that uses [StateNotifier](https://pub.dev/documentation/state_notifier/latest/state_notifier/StateNotifier-class.html), found in [examples/counter_state_notifier](https://github.com/chimon2000/remote_state/blob/master/examples/counter_state_notifier) +A common use case for RemoteState would be mapping it into a UI transition or component state. Here is an example that uses [StateNotifier](https://pub.dev/documentation/state_notifier/latest/state_notifier/StateNotifier-class.html), found in [examples/counter_state_notifier](https://github.com/chimon2000/remote_state/blob/master/examples/counter_state_notifier) ### [counter/notifier/counter.dart](https://github.com/chimon2000/remote_state/blob/master/examples/counter_state_notifier/lib/counter/notifier/counter.dart) @@ -142,23 +142,23 @@ class HomePage extends StatelessWidget { ### RemoteState.initial -`RemoteState.initial` is an instance of RemoteData that signifies the request hasn't been made yet. +`RemoteState.initial` is an instance of RemoteState that signifies the request hasn't been made yet. ### RemoteState.loading -`RemoteState.loading` is an instance of RemoteData that signifies the request has been made, but it hasn't returned any data yet. +`RemoteState.loading` is an instance of RemoteState that signifies the request has been made, but it hasn't returned any data yet. ### RemoteState.success -`RemoteState.success` is an instance of RemoteData that signifies the request has completed successfully and the new data (of type T) is available. +`RemoteState.success` is an instance of RemoteState that signifies the request has completed successfully and the new data (of type T) is available. ### RemoteState.empty -`RemoteState.success` is an instance of RemoteData that signifies the has completed successfully with an empty response. +`RemoteState.success` is an instance of RemoteState that signifies the has completed successfully with an empty response. ### RemoteState.error -`RemoteState.error` is an instance of RemoteData that signifies the request has failed. +`RemoteState.error` is an instance of RemoteState that signifies the request has failed. ## Pattern matching high order functions diff --git a/packages/remote_state/lib/remote_state.dart b/packages/remote_state/lib/remote_state.dart index 0f64ee1..e8034c8 100644 --- a/packages/remote_state/lib/remote_state.dart +++ b/packages/remote_state/lib/remote_state.dart @@ -34,7 +34,7 @@ abstract class RemoteState with _$RemoteState { /// Defines logic based on the current state. /// /// [when] takes five methods as parameters that reflect each remote state. - /// [when] the returned method gets called with a [RemoteData] state, the method + /// [when] the returned method gets called with a [RemoteState] state, the method /// matching the correct state gets called. /// /// [initial] determines what to do if the state matches [RemoteState.initial] @@ -59,7 +59,7 @@ abstract class RemoteState with _$RemoteState { /// [maybeWhen] takes five methods as parameters that reflect each remote state /// as well as a required [orElse] method. /// - /// [maybeWhen] the returned method gets called with a [RemoteData] state, the method + /// [maybeWhen] the returned method gets called with a [RemoteState] state, the method /// matching the correct state gets called or [orElse] when there's no match. /// /// [initial] determines what to do if the state matches [RemoteState.initial] @@ -85,7 +85,7 @@ abstract class RemoteState with _$RemoteState { /// Achieves the same result as [when] without destructuring. /// /// [map] takes five methods as parameters that reflect each remote state. - /// [map] the returned method gets called with a [RemoteData] state, the method + /// [map] the returned method gets called with a [RemoteState] state, the method /// matching the correct state gets called. /// /// [initial] determines what to do if the state matches [RemoteState.initial] @@ -108,7 +108,7 @@ abstract class RemoteState with _$RemoteState { /// Achieves the same result as [maybeWhen] without destructuring. /// /// [maybeMap] takes five methods as parameters that reflect each remote state. - /// [maybeMap] the returned method gets called with a [RemoteData] state, the method + /// [maybeMap] the returned method gets called with a [RemoteState] state, the method /// matching the correct state gets called. /// /// [initial] determines what to do if the state matches [RemoteState.initial]