Browse Source

feat(dynamite): Support decoding booleans

Signed-off-by: jld3103 <jld3103yt@gmail.com>
pull/759/head
jld3103 1 year ago
parent
commit
9b6f912e76
No known key found for this signature in database
GPG Key ID: 9062417B9E8EB7B3
  1. 2
      packages/dynamite/dynamite/lib/src/type_result/base.dart

2
packages/dynamite/dynamite/lib/src/type_result/base.dart

@ -34,6 +34,8 @@ class TypeResultBase extends TypeResult {
return '($object as String)'; return '($object as String)';
case 'int': case 'int':
return 'int.parse($object as String)'; return 'int.parse($object as String)';
case 'bool':
return "($object as String == 'true')";
case 'JsonObject': case 'JsonObject':
return 'JsonObject($object)'; return 'JsonObject($object)';
default: default:

Loading…
Cancel
Save