Replies: 2 comments 8 replies
-
|
Ok, so i have removed the databaseDirectory parameter from the DriftNativeOptions constructor. But now i am getting nothing loaded on my app and my IDE (VisualStudio) is opening up a file I am do have the Bloc framework in my application but to test the waters, i've added the following in my main function: Anyone know what might be causing the blank page after adding |
Beta Was this translation helpful? Give feedback.
-
|
I see that the documentation is not great here, sorry about that experience.
That's weird, this should have worked with
You were also supposed to import
Running drift on the web requires a bit of an additional setup described here. Unfortunately we can't ship the required assets with drift, you need to manually copy them into your project and then opt in to web support. This is also something the documentation should have mentioned though. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi there. I am trying to incorporate drift into my application.
I am following the guide as written on this webpage.
I initially had the following in my pubspec:
dependencies:
drift: ^2.25.0
drift_flutter: ^0.2.4
dev_dependencies:
drift_dev: ^2.25.0
build_runner: ^2.4.14
But upon running the
dart run build_runner build, I kept on getting the following error msg:Target of URI hasn't been generated: 'package:budgetapplication/repository/database.g.dart'.
Try running the generator that will generate the file referenced by the URI.
I then overcame this by moving all dependencies into the
dependenciescolumn:drift: ^2.25.0
drift_flutter: ^0.2.4
drift_dev: ^2.25.0
build_runner: ^2.4.14
And now, after running the
dart run build_runner buildcommand, it did generate the class. But after pasting the code snippet in the next instruction depicted in the set up guide which looks like this:i am getting an error:
Undefined name 'getApplicationSupportDirectory'.
Try correcting the name to one that is defined, or defining the name.
Because the variable is not declared. What do i set this to?
Beta Was this translation helpful? Give feedback.
All reactions