Skip to content

Commit

Permalink
fix(dynamite): Support decoding booleans
Browse files Browse the repository at this point in the history
Signed-off-by: jld3103 <[email protected]>
  • Loading branch information
provokateurin committed Aug 23, 2023
1 parent c63e8e7 commit 44d0928
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions packages/dynamite/dynamite/lib/src/type_result/base.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit 44d0928

Please sign in to comment.