You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I created entity with name QuestionData and set its table name as questions.
When i ran command flutter packages pub run build_runner build, it generated database file with function _questionsInsertionAdapter being called in insert method, but it declared _questionDataInsertionAdapter in class _$QuestionsDao, instead of declaring _questionsInsertionAdapter. It caused syntax error of undefined _questionDataInsertionAdapter in generated file.
Below is are my files' code to better explain this bug. questions-dao.dart
import 'package:floor/floor.dart';
import '../modals/response.dart';
@dao
abstract class QuestionsDao {
@Query('SELECT * from ${QuestionData.TABLE_NAME}')
Future<List<QuestionData>> findAllQuestions();
@Query('SELECT * from ${QuestionData.TABLE_NAME} where isAnswered=false')
Future<List<QuestionData>> findAllUnansweredQuestions();
@Insert()
Future<void> insertQuestions(List<QuestionData> questions);
}
I created entity with name
QuestionData
and set its table name asquestions
.When i ran command
flutter packages pub run build_runner build
, it generated database file with function_questionsInsertionAdapter
being called in insert method, but it declared_questionDataInsertionAdapter
in class_$QuestionsDao
, instead of declaring _questionsInsertionAdapter. It caused syntax error ofundefined _questionDataInsertionAdapter
in generated file.Below is are my files' code to better explain this bug.
questions-dao.dart
response.dart
akkh-database.dart
akkh-database.g.dart
The text was updated successfully, but these errors were encountered: