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
[✓] Network resources
• All expected network resources are available.
• No issues found!
Dart Version
3.3.0 (stable)
Steps to Reproduce
Response class .toString()
Expected Result
As topic says, I'm getting some inner flutter Http error in post dio request.
Response variable in my code and in dio post() call guaranteed as nonNull,
but my log func call (RESPONSE: response.toString), prints "RESPONSE: null", which can be obfusticated.
Later I encounted that current dio toString() looks like this and returns only Generic object
@overrideStringtoString() {
if (data isMap) {
// Log encoded maps for better readability.return json.encode(data);
}
return data.toString();
}
Response can have unexpected large size that affects the whole log thread and stuck the session. We have LogInterceptor that logs some types of response in a pretty format. And it should be easy to add your own interceptor to log responses with your own expectation.
Package
dio
Version
5.4.1
Operating-System
iOS
Output of
flutter doctor -v
[✓] Flutter (Channel stable, 3.19.1, on macOS 14.3.1 23D60 darwin-arm64, locale en-RU)
• Flutter version 3.19.1 on channel stable at /opt/homebrew/Caskroom/flutter/3.16.0/flutter
• Upstream repository https://github.com/flutter/flutter.git
• Framework revision abb292a07e (9 days ago), 2024-02-20 14:35:05 -0800
• Engine revision 04817c99c9
• Dart version 3.3.0
• DevTools version 2.31.1
[✓] Android toolchain - develop for Android devices (Android SDK version 34.0.0)
• Android SDK at /Users/aleksandrpavlenko/Library/Android/sdk
• Platform android-34, build-tools 34.0.0
• Java binary at: /Applications/Android Studio.app/Contents/jbr/Contents/Home/bin/java
• Java version OpenJDK Runtime Environment (build 17.0.7+0-17.0.7b1000.6-10550314)
• All Android licenses accepted.
[✓] Xcode - develop for iOS and macOS (Xcode 15.0.1)
• Xcode at /Applications/Xcode.app/Contents/Developer
• Build 15A507
• CocoaPods version 1.15.2
[✓] Chrome - develop for the web
• Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome
[✓] Android Studio (version 2023.1)
• Android Studio at /Applications/Android Studio.app/Contents
• 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.7+0-17.0.7b1000.6-10550314)
[✓] VS Code (version 1.84.2)
• VS Code at /Applications/Visual Studio Code.app/Contents
• Flutter extension can be installed from:
🔨 https://marketplace.visualstudio.com/items?itemName=Dart-Code.flutter
[✓] Connected device (2 available)
• macOS (desktop) • macos • darwin-arm64 • macOS 14.3.1 23D60 darwin-arm64
• Chrome (web) • chrome • web-javascript • Google Chrome 122.0.6261.69
[✓] Network resources
• All expected network resources are available.
• No issues found!
Dart Version
3.3.0 (stable)
Steps to Reproduce
Response class .toString()
Expected Result
As topic says, I'm getting some inner flutter Http error in post dio request.
Response variable in my code and in dio post() call guaranteed as nonNull,
but my log func call (RESPONSE: response.toString), prints "RESPONSE: null", which can be obfusticated.
Later I encounted that current dio toString() looks like this and returns only Generic object
expected result
Actual Result
[log] 🧨[13:18:06][ERROR][cell/get] - RESPONSE: null
The text was updated successfully, but these errors were encountered: