-
Description I am using the modular approach as described in the drift website and repository example. A simplified version of the project directory. (actual table names are just replaced)
In this tables/ directory, I have multiple files which define tables in the database using *.drift files. The issue I am facing is after having generated the auto generated *.drift.dart files I now have the directory filled with *.drift and *.drift.dart files. If you can see the example (the link 2), I have followed a similar approach to it. When I try to build the application. I get the errors at build time.
Other syntax related errors are found from this and other *.drift files such as the ones below. I have removed some of the logs (mainly just he file paths where the source of error is) to show the different kinds of errors.
The code in users.drift is simple and other tables also have similar definitions. CREATE TABLE Users (
ID INTEGER NULL,
Name TEXT NULL,
Age INTEGER NULL,
Email TEXT NULL
); My question is, has anyone faced a similar issue in the past? Am I missing some important configurations and any inputs to help me fix this will be appreciated. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
SolvedThe reason for the issue was that in one of my .dart files I accidentally added *.drift imports. This was causing the errors, fixed the imports to *.drift.dart and now the build works as expected. |
Beta Was this translation helpful? Give feedback.
Solved
The reason for the issue was that in one of my .dart files I accidentally added *.drift imports. This was causing the errors, fixed the imports to *.drift.dart and now the build works as expected.