Closed DanielCardona closed 4 years ago
It sounds more like a bug in the compiler than in 'package:universal_html'?
Thanks @terrier989 , then should I open the Issue in flutter Guihub, or wait to get confirmation?
You could try whether upgrading everything helps:
flutter upgrade
flutter pub upgrade
I just tried what you suggest but the result is the same.
I opened an Issue in flutter Guithub: https://github.com/flutter/flutter/issues/47589
I reopen the Issue, as it seems related to universal_html https://github.com/flutter/flutter/issues/47589#issuecomment-568258742.
Thank you.
Finally I used dart2 conditionals imports, it solved the problem, thanks!
import "package:ptf_online/utils/filepicker_pc.dart" if (dart.library.io) "package:ptf_online/utils/filepicker_device.dart";
same issue with FIleReader(), i cant compile for android.
import 'package:universal_html/html.dart' as html
Future
input.remove();
}
@DanielCardona can you help me fix it?
Hi @alonhh! Maybe this link help you to make it work: https://stackoverflow.com/questions/59342873/flutter-filereader-crash-when-compiling-to-android/59577702#59577702, if not tell me and tomorrow will try to help you.
@DanielCardona @alonhh
I was able to reproduce the bug. It's now fixed in the version 1.1.19.
I'm developing a multiplatform app, it works in Android, IOS and on the WEB. I have diferent services that I call depending of the platform, in one of this services I'm using FileReader() to upload a file from the web, it works when building for WEB. But if I don't comment the FileReader() object, to hide to compiler, it dont let me build the Android version, here is the output:
The code I'm using to pick image for web:
Any alternative to FileReader(), or any way to make it work, without needing to comment the web service, to compile for mobile device?
Thank so much for any help.