Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

科学计数法转换问题 java接口返回double=1.05555046E9 在dart中 用double接收后值不对 #2121

Closed
mengzhidaren opened this issue Feb 29, 2024 · 1 comment

Comments

@mengzhidaren
Copy link

mengzhidaren commented Feb 29, 2024

Package

dio

Version

5.4.1

Operating-System

Windows

Output of flutter doctor -v

[√] Flutter (Channel stable, 3.19.0, on Microsoft Windows [版本 10.0.22000.2538], locale zh-CN)
[√] Windows Version (Installed version of Windows is version 10 or higher)
[√] Android toolchain - develop for Android devices (Android SDK version 34.0.0)
[√] Chrome - develop for the web
[√] Visual Studio - develop Windows apps (Visual Studio Community 2019 16.11.5)
[√] Android Studio (version 2022.2)
[√] Android Studio (version 2022.3)
[√] Android Studio (version 2023.1)
[√] VS Code (version 1.85.2)
[√] Connected device (4 available)
[√] Network resources

Dart Version

No response

Steps to Reproduce

//java
double javaValue = "1.05555046E9";

//dart
double dartValue = double.parse(javaValue);
print(dartValue); // 输出:1055550460.0
如何在dio中修复这种科学计数法转换问题
Decimal.parse(javaValue)

Expected Result

1.05555046

Actual Result

1055550460.0

@mengzhidaren mengzhidaren added h: need triage This issue needs to be categorized s: bug Something isn't working labels Feb 29, 2024
@AlexV525
Copy link
Member

为何会与 Dio 有关?

@AlexV525 AlexV525 closed this as not planned Won't fix, can't repro, duplicate, stale Feb 29, 2024
@AlexV525 AlexV525 added i: not related and removed h: need triage This issue needs to be categorized s: bug Something isn't working labels Feb 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants