dart:html is placed inside the file but Error is not found?
I have a project using JSON APIs was working fine suddenly error occurs while i was debugging my application and want to modify but when i restarted the app it suddenly shows the following error. The required import 'dart:html';
is already in that file. but don't know why this happens. I tried to import dart.io
but same issue. i tried to to restart and invilidate caches but the problem exist.
Error:
Launching lib\main.dart on Infinix X652 in debug mode...
Running Gradle task 'assembleDebug'...
Invalid depfile: E:\Flutter Projects\criclite\.dart_tool\flutter_build\d908c0f5b30e137aa06d363a041f44ee\kernel_snapshot.d
Invalid depfile: E:\Flutter Projects\criclite\.dart_tool\flutter_build\d908c0f5b30e137aa06d363a041f44ee\kernel_snapshot.d
lib/ui/News.dart:6:8: Error: Not found: 'dart:html'
import 'dart:html';
Note: project was working fine this issue suddenly comes out without any changes made.
Please remove import dart:html
then flutter clean
and run will resolve issue.