0

I've replaced one package with another: dart:io on universal_io. And this showed me an error.

: Error: A value of type 'Directory/*1*/' can't be assigned to a variable of type 'Directory/*2*/'.
lib/…/sqlite/database.dart:42
 - 'Directory/*1*/' is from 'dart:io'.
- 'Directory/*2*/' is from 'package:universal_io/src/io_impl_js/directory.dart' ('/C:/Users/Asus/AppData/Local/Pub/Cache/hosted/pub.dartlang.org/universal_io-1.0.1/lib/src/io_impl_js/directory.dart').
package:universal_io/…/io_impl_js/directory.dart:1
    io.Directory directory = await getApplicationDocumentsDirectory();

                             ^
Failed to compile application.

rays7c
  • 5
  • 2
  • I have changed the version and name of my db. I use Sqflite as database in my app – rays7c Feb 03 '22 at 07:49
  • 1
    I don't think you can write files to the file system at all via web, regardless of your syntax error. Maybe think about your business case first? – nvoigt Feb 03 '22 at 08:17

0 Answers0