diff --git a/packages/dynamite/dynamite/lib/src/type_result/base.dart b/packages/dynamite/dynamite/lib/src/type_result/base.dart index cec6ccef60e..f478bf980ce 100644 --- a/packages/dynamite/dynamite/lib/src/type_result/base.dart +++ b/packages/dynamite/dynamite/lib/src/type_result/base.dart @@ -34,6 +34,8 @@ class TypeResultBase extends TypeResult { return '($object as String)'; case 'int': return 'int.parse($object as String)'; + case 'bool': + return "($object as String == 'true' || $object as String == '1')"; case 'JsonObject': return 'JsonObject($object)'; default: