while Image picker, I couldn't solve this error.
This Argument typr 'File' cant be assigned in this paameter type File
26 Views Asked by palani At
2
There are 2 best solutions below
0
afaque ali
On
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.
Related Questions in FLUTTER
- Flutter + Dart: Editing name of a tab shows up a black screen
- The Binary Version Of its metadata is 1.8.0, expected Version is 1.6.0 build error
- Way to get CustomPainter to track face in Camera Flutter MLKit
- flutter Null check error: did not show file and line number
- Creating multiple instances of a class with different initializing values in Flutter
- I want to paste stickers into to my TextField and to show the stickers beside the emojis
- Flutter plugin development android src not opening after opening example
- Module not found when building flutter app for IOS
- How to make barrier area interactive in flutter modal bottom sheet
- Can an RPC result be included in a Supabase select function in Flutter for Data Modeling?
- Why do I need to wait to reaccess to Firestore database even though it has already done before?
- Flutter web app on Windows -how to support mouse drag for horizontal and vertical scrolling as well as using mouse wheel
- I wrote this time displaying FLUTTER app, How can I improve it?
- Appwrite and / or Spring Boot Backend
- Flutter two_dimensional_scrollables Web app Chrome - cannot get horizontal scroll to work?
Related Questions in FLUTTER-WEB
- Failed to get Firebase project xxxxxx. Please make sure the project exists and your account has permission to access it
- How to update text based on ListWheelScrollView
- Flutter : credit card textfield style all details in single texfield
- flutter http post empty on server side
- How to declare String and List in the current version of flutter?
- Flutter responsive Row or Row alternative suggestions
- Number formatter in flutter for Indian number system
- Flutter web App fails to deploy on cloud Run
- How to create a scrollable expandable list with a custom clipped container?
- flutter web app on app engine 404 on flutter.js
- flutter layout in singlechildscrollview
- Flutter: "setState() or markNeedsBuild() called during build" error in provider class
- Flutter Go Router no back button and nothing to pop
- Event$ object was thrown resolving an image frame: [object Event]
- Flutter right overflow by 220 pixel
Related Questions in FLUTTER-ANIMATION
- Flutter animation stops on user click, but navigation doesn't occur. How can I make cards clickable during animation to trigger navigation?
- How to create under the label in Textformfield, not a border, in Flutter
- Same animated background widget on every page in flutter
- Flutter: keep old value until implicit animation is done
- In my flutter app, selectedItemcolor does not change
- How to build RoadMap UI using a dotted line
- how to use flutter curve value from high to low
- TextInput style like WhatApp
- How do you fix the test widget in dart
- AnimatedSwitcher between 2 Cards - how to make the Cards the same height (shorter one expands to be the same height as taller one)?
- How can I create a circular animation with orbiting images in Flutter?
- How do I create a widget that can be pushed and pushed with the appropriate animation? Flutter
- I can't figure out how to implement the display of elements in various actions. Flutter
- Create widget in flutter
- AnimatedContainer Padding Issue
Related Questions in FLUTTER-TEST
- Can't test image widget from asset built with Image.asset() constructor in Flutter
- The backgroundHandler needs to be either a static function or a top level function to be accessible as a Flutter entry point
- Show list of all videos from internal storage
- No velocity detected when testing a swipe action in flutter
- The android permission BLUETOOTH_SCAN not working in android 12 in flutter
- How to declare String and List in the current version of flutter?
- Active Color in Pageview builder
- This Argument typr 'File' cant be assigned in this paameter type File
- 1:8: Error: Dart library 'dart:html' is not available on this platform, // This heppens whenever i write code rellated with firebase storage
- How to detect if iOS or Android device has HomeBar at the bottom of device in flutter
- Create timeframe widget in flutter
- Flutter dropdown default value wiith language
- screen_util.dart:58:5: Error: 'FlutterWindow' isn't a type. FlutterWindow? window,
- How to write code in flutter which reads input from a file dynamically(continuosly) and displays?
- Oops; flutter has exited unexpectedly: errno = 32
Trending Questions
- UIImageView Frame Doesn't Reflect Constraints
- Is it possible to use adb commands to click on a view by finding its ID?
- How to create a new web character symbol recognizable by html/javascript?
- Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)?
- Heap Gives Page Fault
- Connect ffmpeg to Visual Studio 2008
- Both Object- and ValueAnimator jumps when Duration is set above API LvL 24
- How to avoid default initialization of objects in std::vector?
- second argument of the command line arguments in a format other than char** argv or char* argv[]
- How to improve efficiency of algorithm which generates next lexicographic permutation?
- Navigating to the another actvity app getting crash in android
- How to read the particular message format in android and store in sqlite database?
- Resetting inventory status after order is cancelled
- Efficiently compute powers of X in SSE/AVX
- Insert into an external database using ajax and php : POST 500 (Internal Server Error)
Popular Questions
- How do I undo the most recent local commits in Git?
- How can I remove a specific item from an array in JavaScript?
- How do I delete a Git branch locally and remotely?
- Find all files containing a specific text (string) on Linux?
- How do I revert a Git repository to a previous commit?
- How do I create an HTML button that acts like a link?
- How do I check out a remote Git branch?
- How do I force "git pull" to overwrite local files?
- How do I list all files of a directory?
- How to check whether a string contains a substring in JavaScript?
- How do I redirect to another webpage?
- How can I iterate over rows in a Pandas DataFrame?
- How do I convert a String to an int in Java?
- Does Python have a string 'contains' substring method?
- How do I check if a string contains a specific word?
Apparently you have imported some unrelated File types from other libraries. To fix this, remove the imports:
Now click on the
imageFilevariable and import the appropriate class.