CodingAleCR / http_interceptor

A lightweight, simple plugin that allows you to intercept request and response objects and modify them if desired.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

type 'Response' is not a subtype of type 'StreamedResponse' in type cast

antonshkurenko opened this issue · comments

Describe the bug
Hey guys, I'm using ^2.0.0-beta.7. I have this error in two cases (100% of time):

  1. Any time I use send method in the client (https://pub.dev/documentation/http/latest/http/Client/send.html)
  2. When I provide client to the CacheManager's config here: https://pub.dev/documentation/flutter_cache_manager/latest/flutter_cache_manager/HttpFileService/HttpFileService.html

It looks like it somehow just force casts and crashes every time here: https://github.com/CodingAleCR/http_interceptor/blob/main/lib/http/intercepted_client.dart#L222

Expected behavior
No crashes

Please complete the following information):

  • Flutter version: 3.10.5
  • IDE: Android Studio
  • http_interceptor Version: ^2.0.0-beta.7