You have to override moor:4.4.0 dependency using dependency_override section
dependencies:
flutter:
sdk: flutter
...
moor_flutter: ^4.0.0
dependency_overrides:
moor: '4.4.0'
dev_dependencies:
flutter_test:
sdk: flutter
...
moor_generator: ^4.4.1
then run following command in terminal/command prompt get packages
flutter clean
flutter pub get
the run following command to generate moor files.
flutter pub run build_runner build --delete-conflicting-outputs