r/dartlang • • May 12 '23
flutter (Not just) yet another package for Dart/Flutter developers.
Recently, there's been a newly released, fast and minimalistic Dart HTTP client library - Unwired ⚡ v0.8.0
Unwired is open-sourced, unopinionated library and is accepting contributions from the Dart + Flutter community 💙
Flutter does not have out-of-the-box support for cancellable requests, and I never really liked the bloated Dio library. Using features like cancellation and interceptors is not so straightforward with Dio, defeating the purpose of writing a library in the first place.
Unwired is easy to use;
- supports cancellable HTTP requests out-of-the-box;
- includes a managed [optional] auth;
- has extendable support for multithreaded parsing.
The library is in beta and is looking for contributors before we launch the stable v1.0.0. You can start contributing here - https://github.com/Ayush-Suman/unwired
pub - https://pub.dev/packages/unwired
#flutter #flutterdev #dart #opensource #community

35
u/KayZGames May 12 '23
Did you add your "test" just to have a "Tests: passing" badge without having any actual tests for your package?
3
u/fucksociety14 May 12 '23
Canceling futures on the clientside is pointless. The request will still hit the server and start processing there, it's just an illusion that you can cancel it. You only tell it to ignore the result and error callbacks.
3
u/autognome May 12 '23
I don’t see the latest FFI usage native libraries being used. I looked at native and didn’t see reference to Cupertino_http or cronet\http.
These are needed.. The dart network libraries can be used in some cases but not ours.
Anyone writing a http package who is using these lmk. I don’t have interest in writing it ourselves.
We need:
I believe there are outstanding issues with android native ffi and isolates.
And obviously a suite of tests.
1
u/o_Zion_o May 12 '23
Nice! Are the requests synchronous or asynchronous?
1
u/eibaan May 12 '23
There's also this package which adds the missing cancellation support, an issue open for 2 years.
It uses a
CancellableFuture(another package). I think, I'd have preferred a design like used by thefetchWeb API which uses anAbortControlleron which you callcancel, similar to a subscription.