I'm using dart-sqlite to operate sqlite in Dart.
Sqlite has a timestamp
field, and Dart has a type of DateTime
. But when I insert an DateTime
instance to sqlite, it will throw an error of:
Uncaught Error: SqliteException: Invalid parameter type
Stack Trace:
#0 _bind (package:dart-sqlite/sqlite.dart:246:1)
#1 Statement.execute (package:dart-sqlite/sqlite.dart:142:33)
#2 Database.execute (package:dart-sqlite/sqlite.dart:78:31)
#3 Database.execute (package:dart-sqlite/sqlite.dart:79:7)
How to fix it?