You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
/// Maps the given [data] to the output type [TOut].
40
+
TOut map(String data);
41
+
40
42
@override
41
43
/// Client-specific method needed for handling the API response.
42
44
Future<RequestState<TOut, int>> handleResult(
@@ -72,7 +74,7 @@ class ProjectDetailsCubit extends HttpRequestCubit<ProjectDetailsDTO> {
72
74
final String id;
73
75
74
76
@override
75
-
// This method allows to map the given TRes into TOut.
77
+
// This method allows to map the given data into TOut.
76
78
ProjectDetailsDTO map(String data) =>
77
79
ProjectDetailsDTO.fromJson(jsonDecode(data) as Map<String, dynamic>);
78
80
@@ -90,7 +92,7 @@ The cubit itself handles the things like:
90
92
- logging - you can observe what is happening inside of the cubit.
91
93
92
94
### `ArgsRequestCubit`
93
-
`ArgsRequestCubit<TArgs, TRes, TData, TOut, TError>` is a version of `RequestCubit` in which the request method accepts an argument. `TArgs` determines the type of arguments accepted by the request method. `TRes`, `TData`, `TOut` and `TError` serve the same purpose as in `RequestCubit`.
95
+
`ArgsRequestCubit<TArgs, TRes, TOut, TError>` is a version of `RequestCubit` in which the request method accepts an argument. `TArgs` determines the type of arguments accepted by the request method. `TRes`, `TOut` and `TError` serve the same purpose as in `RequestCubit`.
94
96
95
97
If you call `refresh()` on `ArgsRequestCubit` it will perform a request with the last used arguments. They are also available under `lastRequestArgs` field.
0 commit comments