while Image picker, I couldn't solve this error.
CodePudding user response:
Apparently you have imported some unrelated File types from other libraries. To fix this, remove the imports:
C:\Users\91908\Downloads\ flutter_windows 3.3.9-stable\flutter\bin\cache lpkg \sky_engine\lib\html html_dart2js.dart
C: Users\91908\Downloads\flutter windows_3.3.9-stable\flutter\bin|cache\pkg\sky_engine Vib\io\file.dart
Now click on the imageFile
variable and import the appropriate class.
CodePudding user response:
This issue is because You are importing two libraries having property named as File. Just import "Dart io" which is responsible for image Files.
import 'dart:io';
It is defined at (C: Users\91908\Downloads\flutter windows_3.3.9-stable\flutter\bin|cache\pkg\sky_engine Vib\io\file.dart) in your PC.
And remove the other library which is causing issue. In your case probably it is
html_dart2js;
It is defined at (C:\Users\91908\Downloads\ flutter_windows 3.3.9-stable\flutter\bin\cache lpkg \sky_engine\lib\html html_dart2js.dart) in your PC.