-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
Unsupported operation: Platform._environment #1565
Comments
This line throws an exception on web |
Should probably retract that version |
I have the same issue, on mobile it works perfectly but it fails on Chrome. Tested on latest Windows 10 and latest MacOS |
same problem, switch back to fl_chart version: ^0.65.0 fixed the problem or removed variable the final _isTest = Platform.environment.containsKey('FLUTTER_TEST'); and dart.io in bar_chart_data.dart |
I'm getting the same "Unsupported operation: Platform._environment" exception on Web with 0.66.1, making the latest version unusable on Web. If I downgrade back to 0.65.0, then fl_chart works again on Web. |
+1 |
The Platform.environment can not be be accessed in flutter web. Remove the check when running on web to prevent an exception. Fixes imaNNeo#1565.
The Platform.environment can not be be accessed in flutter web. Remove the check when running on web to prevent an exception. Fixes #1565.
Yes, that was my mistake. |
Thanks :) 👍 |
The Platform.environment can not be be accessed in flutter web. Remove the check when running on web to prevent an exception. Fixes imaNNeo#1565.
https://github.com/imaNNeo/fl_chart/blame/4b144a03d14b750aea76001f763442eff8044c69/lib/src/chart/line_chart/line_chart_data.dart#L13
The text was updated successfully, but these errors were encountered: