[DB] database path: /data/user/0/com.myapp.hsk_vocabulary/databases
I/flutter (11102): Current level is: New HSK 2%' OR level='Old HSK 2'
E/SQLiteLog(11102): (1) no such table: hsk
E/flutter (11102): [ERROR:flutter/runtime/dart_vm_initializer.cc(41)] Unhandled Exception: DatabaseException(no such table: test (code 1 SQLITE_ERROR): , while compiling: SELECT * FROM test WHERE level LIKE 'New test 2%' OR level='Old HSK 2') sql 'SELECT * FROM test WHERE level LIKE 'New test 2%' OR level='Old test 2' ' args []
E/flutter (11102): #0 wrapDatabaseException (package:sqflite/src/exception_impl.dart:11:7)
E/flutter (11102):
E/flutter (11102): #1 SqfliteDatabaseMixin.txnRawQuery. (package:sqflite_common/src/database_mixin.dart:404:30)
E/flutter (11102):
E/flutter (11102): #2 BasicLock.synchronized (package:synchronized/src/basic_lock.dart:33:16)
E/flutter (11102):
E/flutter (11102): #3 SqfliteDatabaseMixin.txnSynchronized (package:sqflite_common/src/database_mixin.dart:344:14)
E/flutter (11102):
E/flutter (11102): #4 DB.retrieveTotalRow (package:hsk_words/db/db.dart:114:42)
E/flutter (11102):
E/flutter (11102): #5 _HskListState.getTotalRow (package:hsk_words/pages/hsk_list/hsk_level_catalog.dart:44:21)
E/flutter (11102):
E/flutter (11102):
E/libc (11102): Access denied finding property "ro.serialno"
W/.hsk_vocabulary(11102): type=1400 audit(0.0:47): avc: denied { read } for name="u:object_r:serialno_prop:s0" dev="tmpfs" ino=6299 scontext=u:r:untrusted_app:s0:c90,c256,c512,c768 tcontext=u:object_r:serialno_prop:s0 tclass=file permissive=0
V/StudioProfiler(11102): Transformed class: android/app/job/JobService
D/StudioTransport(11102): Receiving kDaemonConnectRequest, receive_fd=97 current_fd_=-1
V/StudioTransport(11102): Create gRPC channel on fd-based target 'unix:&97'
V/StudioTransport(11102): JNIEnv not attached
V/StudioProfiler(11102): Memory control stream started.
Solution
Read the table data after it was fully loaded. You can use await keyword.