Skip to content

Commit

Permalink
_TypeWrapperCollection.parse: clean code
Browse files Browse the repository at this point in the history
  • Loading branch information
gmpassos committed Nov 8, 2024
1 parent e031dc8 commit c754360
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions lib/src/reflection_factory_type.dart
Original file line number Diff line number Diff line change
Expand Up @@ -1010,7 +1010,7 @@ class _TypeWrapperList extends _TypeWrapperCollection {
if (typeInfo != null && typeInfo.argumentsLength >= 1) {
return typeInfo.callCastedArgumentA(<A>() => TypeParser.parseList<A>(
value,
elementParser: typeInfo.argumentParser(0)) as V?);
elementParser: typeInfo.argumentParser<A>(0)) as V?);
} else {
return TypeParser.parseList(value) as V?;
}
Expand Down Expand Up @@ -1039,7 +1039,7 @@ class _TypeWrapperIterable extends _TypeWrapperCollection {
}
} else {
return TypeParser.parseList<A>(value,
elementParser: typeInfo.argumentParser(0)) as V?;
elementParser: typeInfo.argumentParser<A>(0)) as V?;
}
});
} else {
Expand All @@ -1065,8 +1065,8 @@ class _TypeWrapperMap extends _TypeWrapperCollection {
if (typeInfo.argumentsLength >= 2) {
return typeInfo.callCastedArgumentsAB(<A, B>() =>
TypeParser.parseMap<A, B>(value,
keyParser: typeInfo.argumentParser(0),
valueParser: typeInfo.argumentParser(1)) as V?);
keyParser: typeInfo.argumentParser<A>(0),
valueParser: typeInfo.argumentParser<B>(1)) as V?);
} else {
return TypeParser.parseMap(value,
keyParser: typeInfo.argumentParser(0),
Expand All @@ -1089,7 +1089,7 @@ class _TypeWrapperSet extends _TypeWrapperCollection {
V? parse<V>(Object? value, {V? def, TypeInfo? typeInfo}) {
if (typeInfo != null && typeInfo.argumentsLength >= 1) {
return typeInfo.callCastedArgumentA(<A>() => TypeParser.parseSet<A>(value,
elementParser: typeInfo.argumentParser(0)) as V?);
elementParser: typeInfo.argumentParser<A>(0)) as V?);
} else {
return TypeParser.parseSet(value) as V?;
}
Expand Down Expand Up @@ -1142,8 +1142,8 @@ class _TypeWrapperMapEntry extends _TypeWrapper {
if (typeInfo.argumentsLength >= 2) {
return typeInfo.callCastedArgumentsAB(<A, B>() =>
TypeParser.parseMapEntry<A, B>(value,
keyParser: typeInfo.argumentParser(0),
valueParser: typeInfo.argumentParser(1)) as V?);
keyParser: typeInfo.argumentParser<A>(0),
valueParser: typeInfo.argumentParser<B>(1)) as V?);
} else {
return TypeParser.parseMapEntry(value,
keyParser: typeInfo.argumentParser(0),
Expand Down

0 comments on commit c754360

Please sign in to comment.