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
{{ message }}
Repository navigation
Investigate patching dart-lang/http to be Flutter compatible. #5831
Since we are deprecating the Mojo networking stack in Flutter, users will have to rely on dart:io directly. It has been reported that dart:io is quite a bit more low level than necessary for common use cases. dart-lang/http is a suitable wrapper around dart:io but is not compatible with Flutter because of its use of mirrors.
We should investigate strategies to make dart-lang/http usable from Flutter. Either by providing patches to the canonical repo or forking the same.
In the meantime, we can just re-host package:flutter/http.dart on top of dart:io. It's already a fork of dart-lang/http code, so we can probably borrow their dart:io backend.
In the meantime, we can just re-host package:flutter/http.dart on top of dart:io. It's already a fork of dart-lang/http code, so we can probably borrow their dart:io backend.
I forked dart-lang/http.dart and got rid of its use of mirrors and use dart:io directly: https://github.com/chinmaygarde/flutter_http. Seems to work fine. Patching our use of accessing data from an image pipe now.
This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of flutter doctor -v and a minimal reproduction of the issue.
Activity
abarth commentedon Sep 12, 2016
In the meantime, we can just re-host
package:flutter/http.darton top ofdart:io. It's already a fork ofdart-lang/httpcode, so we can probably borrow theirdart:iobackend.chinmaygarde commentedon Sep 12, 2016
sgtm as an interim solution.
sethladd commentedon Sep 12, 2016
We might also want to update our copy of http. See #5370
abarth commentedon Sep 12, 2016
How about this for a plan:
package:flutter/http.dartpackage:flutter/http.dartondart:iopackage:flutter/http.dartin favor ofpackage:http/http.dartor updatepackage:flutter/http.dart.collinjackson commentedon Sep 12, 2016
Does our dart:io do HTTPS properly yet?
abarth commentedon Sep 12, 2016
I believe it does. We should check that first before trying to migrate to it.
chinmaygarde commentedon Sep 12, 2016
I know it works on iOS. Pretty sure Android is fine too. Will follow up with the Dart ninjas if not.
chinmaygarde commentedon Sep 13, 2016
I forked
dart-lang/http.dartand got rid of its use of mirrors and usedart:iodirectly: https://github.com/chinmaygarde/flutter_http. Seems to work fine. Patching our use of accessing data from an image pipe now.chinmaygarde commentedon Nov 29, 2016
This is being tracked in dart-lang/http#1. Closing.
Roll engine to 95e91e3
Roll engine to 95e91e3 (#19716)
github-actions commentedon Sep 5, 2021
This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of
flutter doctor -vand a minimal reproduction of the issue.