enter image description here
while Image picker, I couldn’t solve this error.
2
Apparently you have imported some unrelated File types from other libraries. To fix this, remove the imports:
C:Users91908Downloads flutter_windows 3.3.9-stableflutterbincache lpkg sky_enginelibhtml html_dart2js.dart C: Users91908Downloadsflutter windows_3.3.9-stableflutterbin|cachepkgsky_engine Vibiofile.dart
Now click on the imageFile variable and import the appropriate class.
imageFile
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: Users91908Downloadsflutter windows_3.3.9-stableflutterbin|cachepkgsky_engine Vibiofile.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:Users91908Downloads flutter_windows 3.3.9-stableflutterbincache lpkg sky_enginelibhtml html_dart2js.dart) in your PC.
Click here to cancel reply.
2
Answers
Apparently you have imported some unrelated File types from other libraries.
To fix this, remove the imports:
Now click on the
imageFile
variable and import the appropriate class.This issue is because You are importing two libraries having property named as File.
Just import "Dart io" which is responsible for image Files.
It is defined at (C: Users91908Downloadsflutter windows_3.3.9-stableflutterbin|cachepkgsky_engine Vibiofile.dart) in your PC.
And remove the other library which is causing issue.
In your case probably it is
It is defined at (C:Users91908Downloads flutter_windows 3.3.9-stableflutterbincache lpkg sky_enginelibhtml html_dart2js.dart) in your PC.