flutterdartwebflutter-webdart-ffi

Error: Not found: 'dart:ffi' with flutter web


Read carefully before reporting.

My flutter web project was working perfectly fine. A few hours later, it started complaining about 'dart:ffi: which i didn't even import. I saw similar questions but none of them were in my case. I tried everything I could find but nothing worked. Here are the errors:

/C:/src/flutter/.pub-cache/hosted/pub.dartlang.org/drift-1.7.1/lib/src/sqlite3/database_tracker.dart:1:8: Error: Not found: 'dart:ffi'
import 'dart:ffi';
       ^

/C:/src/flutter/.pub-cache/hosted/pub.dartlang.org/sqlite3-1.8.0/lib/src/ffi/api/database.dart:1:8: Error: Not found: 'dart:ffi'
import 'dart:ffi';
       ^
/C:/src/flutter/.pub-cache/hosted/pub.dartlang.org/sqlite3-1.8.0/lib/src/ffi/api/statement.dart:1:8: Error: Not found: 'dart:ffi'
import 'dart:ffi';
       ^

/C:/src/flutter/.pub-cache/hosted/pub.dartlang.org/sqlite3-1.8.0/lib/open.dart:5:8: Error: Not found: 'dart:ffi'
import 'dart:ffi';
       ^
...
                                          
Failed to compile application.
Exited (sigterm)

I couldn't include the entire debug console's output but these are the top and bottom lines. Please help, thank you.


Solution

  • I figured it out. I just deleted 'web_ffi' folder and it somehow worked.