From 9b6f912e7641f455c49605f0568af27fb58d60fc Mon Sep 17 00:00:00 2001 From: jld3103 Date: Fri, 11 Aug 2023 20:13:49 +0200 Subject: [PATCH] feat(dynamite): Support decoding booleans Signed-off-by: jld3103 --- packages/dynamite/dynamite/lib/src/type_result/base.dart | 2 ++ 1 file changed, 2 insertions(+) diff --git a/packages/dynamite/dynamite/lib/src/type_result/base.dart b/packages/dynamite/dynamite/lib/src/type_result/base.dart index cec6ccef..fe9df7f2 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')"; case 'JsonObject': return 'JsonObject($object)'; default: