Showing
5 changed files
with
74 additions
and
5 deletions
1 | -## [3.23.1] | ||
2 | -- Fix allowSelfSigned | 1 | +## [3.24.0] |
2 | +- GetWidget has been completely redesigned. | ||
3 | +Throughout its lifetime, GetWidget has always been mentioned in the documentation as "something you shouldn't use unless you're sure you need it", and it had a very small use case. A short time ago we realized that it could have some unexpected behaviors, when compared to GetView, so we decided to rebuild it from scratch, creating a really useful widget for the ecosystem. | ||
4 | +Objectively, GetWidget is now a Widget that caches the controller and protects children from their parents' reconstructions. This means that if you have a ListView or gridview, you can add items to it without the child (being a GetWidget) being rebuilt. The api is now more concise, as you can use Get.put / Get.lazyput for global dependencies, and Get.create with GetWidget for ephemeral dependencies, or when you need several identical controllers for the same widget, eliminating the need for tags for most cases. | ||
5 | + | ||
6 | +- Workers now have error handlers, so if an error occurs in your stream, you can recover it from your workers. | ||
7 | + | ||
8 | +- `isTrue` and `isFalse` setters were added to [RxBool], this will make the code more readable, and will mitigate the use of ".value" in Booleans. | ||
9 | + | ||
10 | +- [Patch] method was added in GetConnect. | ||
11 | + | ||
12 | +- Native methods for RxString (trim, contains, startWith, etc.) have been added. | ||
13 | + | ||
14 | +- Standard constructors for RxList and RxMap have been added (RxList.generate, RxList.from, Map.of, Map.from, etc). | ||
15 | + | ||
16 | +- Added "onEmpty" status in StateMixin (@alizera) | ||
17 | + | ||
18 | +- Added query and mutation methods of graphql for getconnect. | ||
19 | + | ||
20 | +- Added body string for content-type application/x-www-form-urlencoded on GetConnect (@eduardoflorence) | ||
3 | 21 | ||
4 | ## [3.23.1] | 22 | ## [3.23.1] |
5 | - Fix allowSelfSigned on Flutter web | 23 | - Fix allowSelfSigned on Flutter web |
@@ -59,7 +59,34 @@ abstract class GetConnectInterface with GetLifeCycleBase { | @@ -59,7 +59,34 @@ abstract class GetConnectInterface with GetLifeCycleBase { | ||
59 | Decoder<T> decoder, | 59 | Decoder<T> decoder, |
60 | }); | 60 | }); |
61 | 61 | ||
62 | - GetSocket socket(String url, {Duration ping = const Duration(seconds: 5)}); | 62 | + Future<Response<T>> patch<T>( |
63 | + String url, | ||
64 | + dynamic body, { | ||
65 | + String contentType, | ||
66 | + Map<String, String> headers, | ||
67 | + Map<String, dynamic> query, | ||
68 | + Decoder<T> decoder, | ||
69 | + Progress uploadProgress, | ||
70 | + }); | ||
71 | + | ||
72 | + Future<GraphQLResponse<T>> query<T>( | ||
73 | + String query, { | ||
74 | + String url, | ||
75 | + Map<String, dynamic> variables, | ||
76 | + Map<String, String> headers, | ||
77 | + }); | ||
78 | + | ||
79 | + Future<GraphQLResponse<T>> mutation<T>( | ||
80 | + String mutation, { | ||
81 | + String url, | ||
82 | + Map<String, dynamic> variables, | ||
83 | + Map<String, String> headers, | ||
84 | + }); | ||
85 | + | ||
86 | + GetSocket socket( | ||
87 | + String url, { | ||
88 | + Duration ping = const Duration(seconds: 5), | ||
89 | + }); | ||
63 | } | 90 | } |
64 | 91 | ||
65 | class GetConnect extends GetConnectInterface { | 92 | class GetConnect extends GetConnectInterface { |
@@ -165,6 +192,28 @@ class GetConnect extends GetConnectInterface { | @@ -165,6 +192,28 @@ class GetConnect extends GetConnectInterface { | ||
165 | } | 192 | } |
166 | 193 | ||
167 | @override | 194 | @override |
195 | + Future<Response<T>> patch<T>( | ||
196 | + String url, | ||
197 | + dynamic body, { | ||
198 | + String contentType, | ||
199 | + Map<String, String> headers, | ||
200 | + Map<String, dynamic> query, | ||
201 | + Decoder<T> decoder, | ||
202 | + Progress uploadProgress, | ||
203 | + }) { | ||
204 | + _checkIfDisposed(); | ||
205 | + return httpClient.patch<T>( | ||
206 | + url, | ||
207 | + body: body, | ||
208 | + headers: headers, | ||
209 | + contentType: contentType, | ||
210 | + query: query, | ||
211 | + decoder: decoder, | ||
212 | + uploadProgress: uploadProgress, | ||
213 | + ); | ||
214 | + } | ||
215 | + | ||
216 | + @override | ||
168 | Future<Response<T>> request<T>( | 217 | Future<Response<T>> request<T>( |
169 | String url, | 218 | String url, |
170 | String method, { | 219 | String method, { |
@@ -242,6 +291,7 @@ class GetConnect extends GetConnectInterface { | @@ -242,6 +291,7 @@ class GetConnect extends GetConnectInterface { | ||
242 | ///""", | 291 | ///""", |
243 | ///); | 292 | ///); |
244 | ///print(response.body); | 293 | ///print(response.body); |
294 | + @override | ||
245 | Future<GraphQLResponse<T>> query<T>( | 295 | Future<GraphQLResponse<T>> query<T>( |
246 | String query, { | 296 | String query, { |
247 | String url, | 297 | String url, |
@@ -274,6 +324,7 @@ class GetConnect extends GetConnectInterface { | @@ -274,6 +324,7 @@ class GetConnect extends GetConnectInterface { | ||
274 | } | 324 | } |
275 | } | 325 | } |
276 | 326 | ||
327 | + @override | ||
277 | Future<GraphQLResponse<T>> mutation<T>( | 328 | Future<GraphQLResponse<T>> mutation<T>( |
278 | String mutation, { | 329 | String mutation, { |
279 | String url, | 330 | String url, |
1 | name: get | 1 | name: get |
2 | description: Open screens/snackbars/dialogs/bottomSheets without context, manage states and inject dependencies easily with GetX. | 2 | description: Open screens/snackbars/dialogs/bottomSheets without context, manage states and inject dependencies easily with GetX. |
3 | -version: 3.23.1 | 3 | +version: 3.24.0 |
4 | homepage: https://github.com/jonataslaw/getx | 4 | homepage: https://github.com/jonataslaw/getx |
5 | 5 | ||
6 | environment: | 6 | environment: |
-
Please register or login to post a comment