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
[√] Flutter (Channel stable, 3.22.0, on Microsoft Windows [Version 10.0.22631.3737], locale en-US)
• Flutter version 3.22.0 on channel stable at C:\flutter
• Upstream repository https://github.com/flutter/flutter.git
• Framework revision 5dcb86f68f (7 weeks ago), 2024-05-09 07:39:20 -0500
• Engine revision f6344b75dc
• Dart version 3.4.0
• DevTools version 2.34.3
[√] Windows Version (Installed version of Windows is version 10 or higher)
[√] Android toolchain - develop for Android devices (Android SDK version 31.0.0)
• Android SDK at C:\Users\kimiy\AppData\Local\Android\sdk
• Platform android-34, build-tools 31.0.0
• ANDROID_HOME = C:\Users\kimiy\AppData\Local\Android\sdk
• ANDROID_SDK_ROOT = C:\Users\kimiy\AppData\Local\Android\sdk
• Java binary at: C:\Program Files\Android\Android Studio\jre\bin\java
• Java version OpenJDK Runtime Environment (build 11.0.13+0-b1751.21-8125866)
• All Android licenses accepted.
[√] Chrome - develop for the web
• Chrome at C:\Program Files\Google\Chrome\Application\chrome.exe
[√] Visual Studio - develop Windows apps (Visual Studio Build Tools 2019 16.11.33)
• Visual Studio at C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools
• Visual Studio Build Tools 2019 version 16.11.34407.143
• Windows 10 SDK version 10.0.19041.0
[√] Android Studio (version 2023.3)
• Android Studio at C:\Program Files\Android\Android Studio
• Flutter plugin can be installed from:
https://plugins.jetbrains.com/plugin/9212-flutter
• Dart plugin can be installed from:
https://plugins.jetbrains.com/plugin/6351-dart
• Java version OpenJDK Runtime Environment (build 17.0.10+0--11572160)
[√] VS Code (version 1.85.1)
• VS Code at C:\Users\kimiy\AppData\Local\Programs\Microsoft VS Code
• Flutter extension version 3.90.0
[√] Connected device (4 available)
• SM A525F (mobile) • RZ8T50QMFDJ • android-arm64 • Android 13 (API 33)
• Windows (desktop) • windows • windows-x64 • Microsoft Windows [Version 10.0.22631.3737]
• Chrome (web) • chrome • web-javascript • Google Chrome 125.0.6422.142
• Edge (web) • edge • web-javascript • Microsoft Edge 126.0.2592.68
[√] Network resources
• All expected network resources are available.
• No issues found!
Dart Version
3.4.0
Steps to Reproduce
Use Dio version 5.4.3+1. (it works fine on version 5.4.1)
Attempt to upload an image using a MultipartFile.fromBytes in a POST request.
KimiyaZargari
changed the title
Error when uploading image using multipart file in version 5.4.3+1
Error when uploading image using MultipartFile.fromBytes in version 5.4.3+1
Jun 27, 2024
Package
dio
Version
5.4.3+1
Operating-System
Android, iOS, Web
Adapter
Default Dio
Output of
flutter doctor -v
Dart Version
3.4.0
Steps to Reproduce
MultipartFile.fromBytes
in a POST request.Code Snippet:
Here is the relevant part of my code:
Data Model:
Expected Result
The image should be uploaded successfully without throwing any exceptions as it does in version 5.4.1
Actual Result
An exception is thrown: type 'EqualUnmodifiableListView' is not a subtype of type 'Uint8List' of 'value'.
[ERROR:flutter/runtime/dart_vm_initializer.cc(41)] Unhandled Exception: type 'EqualUnmodifiableListView' is not a subtype of type 'Uint8List' of 'value'
E/flutter ( 4581): #0 _StreamController.add (dart:async/stream_controller.dart:604:14)
E/flutter ( 4581): #1 _RootZone.runUnaryGuarded (dart:async/zone.dart:1594:10)
E/flutter ( 4581): #2 _BufferingStreamSubscription._sendData (dart:async/stream_impl.dart:365:11)
E/flutter ( 4581): #3 _BufferingStreamSubscription._add (dart:async/stream_impl.dart:297:7)
E/flutter ( 4581): #4 _MultiStreamController.addSync (dart:async/stream_impl.dart:1127:36)
E/flutter ( 4581): #5 new Stream.fromIterable..next (dart:async/stream.dart:375:26)
E/flutter ( 4581): #6 _microtaskLoop (dart:async/schedule_microtask.dart:40:21)
E/flutter ( 4581): #7 _startMicrotaskLoop (dart:async/schedule_microtask.dart:49:5)
E/flutter ( 4581):
The text was updated successfully, but these errors were encountered: