diff --git a/lib/src/descriptors/field_descriptor.dart b/lib/src/descriptors/field_descriptor.dart index 312ff3a..dd4b808 100644 --- a/lib/src/descriptors/field_descriptor.dart +++ b/lib/src/descriptors/field_descriptor.dart @@ -43,15 +43,15 @@ class FieldDescriptor { return '$json[${name.stringLiteral()}]'; } else { final accessor = nullable ? '?' : ''; - return '$json[${name.stringLiteral()}]$accessor.map((item) => ${type.getDeserializer('(item as Map)')}).toList()'; + return '$json[${name.stringLiteral()}]$accessor.map((item) => ${type.getDeserializer('(item as Map)')}).toList()'; } } else { if (type.isScalar) { return '$json[${name.stringLiteral()}]'; } else if (nullable) { - return '($json[${name.stringLiteral()}] == null) ? null : ${type.getDeserializer('($json[${name.stringLiteral()}] as Map)')}'; + return '($json[${name.stringLiteral()}] == null) ? null : ${type.getDeserializer('($json[${name.stringLiteral()}] as Map)')}'; } else { - return type.getDeserializer('($json[${name.stringLiteral()}] as Map)'); + return type.getDeserializer('($json[${name.stringLiteral()}] as Map)'); } } }