Skip to content
Open
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions puro/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## Unreleased

* Added the `prepare` command to pre-download Flutter artifacts for an environment

## 1.4.11

* Bug fixes
Expand Down
50 changes: 15 additions & 35 deletions puro/lib/src/ast/binary.dart
Original file line number Diff line number Diff line change
Expand Up @@ -322,53 +322,33 @@ abstract class BinType {
}
return NamedBinType(schema);
} else if (schema['option'] != null) {
return OptionBinType(BinType.fromSchema(
schema['option'],
typeSchemas,
enumNames,
));
return OptionBinType(
BinType.fromSchema(schema['option'], typeSchemas, enumNames),
);
} else if (schema['list'] != null) {
return ListBinType(BinType.fromSchema(
schema['list'],
typeSchemas,
enumNames,
));
return ListBinType(
BinType.fromSchema(schema['list'], typeSchemas, enumNames),
);
} else if (schema['rlist'] != null) {
return RListBinType(BinType.fromSchema(
schema['rlist'],
typeSchemas,
enumNames,
));
return RListBinType(
BinType.fromSchema(schema['rlist'], typeSchemas, enumNames),
);
} else if (schema['pair'] != null) {
return PairBinType(
BinType.fromSchema(
schema['pair'][0],
typeSchemas,
enumNames,
),
BinType.fromSchema(
schema['pair'][1],
typeSchemas,
enumNames,
),
BinType.fromSchema(schema['pair'][0], typeSchemas, enumNames),
BinType.fromSchema(schema['pair'][1], typeSchemas, enumNames),
);
} else if (schema['array'] != null) {
return ArrayBinType(
schema['array'][0] as String,
BinType.fromSchema(
schema['array'][1],
typeSchemas,
enumNames,
),
BinType.fromSchema(schema['array'][1], typeSchemas, enumNames),
);
} else if (schema['union'] != null) {
return NamedBinType(typeSchemas[schema['union'][0]]![1] as String);
} else if (schema['ifPrivate'] != null) {
return IfPrivateBinType(BinType.fromSchema(
schema['ifPrivate'],
typeSchemas,
enumNames,
));
return IfPrivateBinType(
BinType.fromSchema(schema['ifPrivate'], typeSchemas, enumNames),
);
} else {
throw UnimplementedError('Unknown type: $schema');
}
Expand Down
Loading