drift icon indicating copy to clipboard operation
drift copied to clipboard

Could not resolve annotation for `class Categories`

Open jawadalkassim opened this issue 2 years ago • 2 comments


line 1, column 773 of package:math_learning/filename.dart: Could not resolve annotation for `class Categories`
  ╷
1 │ @DataClassName('Category')
  │ ^^^^^^^^^^^^^^^^^^^^^^^^^^
  ╵
[INFO] Running build completed, took 6.7s

[INFO] Caching finalized dependency graph...
[INFO] Caching finalized dependency graph completed, took 68ms

[SEVERE] Failed after 6.8s
pub finished with exit code 1

I'm following the Code in the Getting-Started Page in the Docs https://drift.simonbinder.eu/docs/getting-started/

I'm getting this error when running flutter pub run build_runner watch

jawadalkassim avatar Feb 19 '23 20:02 jawadalkassim

Thanks for the report! Is that the only error you get? The snippet from the documentation still works for me.

Do you also get an analyzer error around @DataClassName, or is it just the build? What does the line above the line 1, column 773 say? Could you check it's [WARNING] drift_dev on lib/filename.dart:?

simolus3 avatar Feb 19 '23 20:02 simolus3

Having a similar issue. https://github.com/simolus3/drift/issues/2325

stx avatar Feb 23 '23 00:02 stx

There has been no activity in this issue for over a year and no reproducible bug exists.

dickermoshe avatar Aug 16 '24 16:08 dickermoshe