Open1

DartでGetリクエストのリダイレクト先を取得する

いちねんせいいちねんせい

↓曰くできないらしい
https://stackoverflow.com/questions/56861837/how-to-get-redirect-url-in-dart-flutter
https://github.com/dart-lang/http/issues/293

これを実装すればいいらしい
https://github.com/dart-lang/http/pull/321/commits/bb6e3caa55e4ab4ef48e2bfe2168f20c4bbf55e3

実装してみた
https://github.com/suinua/http

var response = await http.get(Uri.parse('https://t.co/rHdIwg75Ao'));
print(parse(response.body).getElementsByTagName('title')[0].text);
print(response.url);//redirect先のURL
dependencies:
  http:
    git: https://github.com/suinua/http.git