-
Notifications
You must be signed in to change notification settings - Fork 42
Closed
Labels
bugSomething isn't workingSomething isn't working
Description
Description
This library cannot be used with flutter 3.16.0 as one of it's functions contains a method call that returns a future which is incorrectly assigned to a different type causing the compilation error.
Steps to reproduce
- Install flutter
- Use this library - I use DioAdapter like so:
DioAdapter dioAdapter = DioAdapter(dio: myDioInstance); dioAdapter.onPost(...); - See error
../../../.pub-cache/hosted/pub.dev/http_mock_adapter-0.6.0/lib/src/mixins/request_handling.dart:32:42: Error: A value of type 'FutureOr<List<int>>' can't be assigned to a variable of type 'List<int>'.
- 'List' is from 'dart:core'.
bytes = options.requestEncoder!(data, options);
Expected behavior
Library can be used with no issues.
System details
Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel stable, 3.16.0, on macOS 14.1.1 23B81 darwin-arm64, locale en-NZ)
[✓] Android toolchain - develop for Android devices (Android SDK version 33.0.1)
[✓] Xcode - develop for iOS and macOS (Xcode 15.0.1)
[✓] Chrome - develop for the web
[✓] Android Studio (version 2022.2)
[✓] VS Code (version 1.84.2)
[✓] Connected device (3 available)
[✓] Network resources
Additional context
Offending line: https://github.com/lomsa-dev/http-mock-adapter/blob/e8298ff3e8e669ca44edbe3c41b8b2f0d4303839/lib/src/mixins/request_handling.dart#L32
adgeg
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working