美文网首页
type 'bool' is not a subtype of

type 'bool' is not a subtype of

作者: AR7_ | 来源:发表于2020-08-07 11:19 被阅读0次

https://stackoverflow.com/questions/57801817/string-is-not-a-subtype-of-type-bool

`bool` are [not supported in SQLite](https://github.com/tekartik/sqflite/blob/master/sqflite/doc/supported_types.md#supported-sqlite-types).

What is likely happening is that the `isDone` column value `true` is converted to the string `"true"` so it is crashing in your `TodoItem.map` constructor.

Try to convert (and parse) the value for example to 1 or 0 (int) before insertion or in query args.

相关文章

网友评论

      本文标题:type 'bool' is not a subtype of

      本文链接:https://www.haomeiwen.com/subject/bszarktx.html