@@ -16,10 +16,10 @@ final class CollectionMapperEvent extends MapperEvent {
1616 Iterable <String > _lhashes = [];
1717 Iterable <String > _lparams = [];
1818 Iterable <String > _ltypes = [];
19- String get args => this . _largs.join (', ' );
20- String get hashes => this . _lhashes.join (', ' );
21- String get params => this . _lparams.join (', ' );
22- String get types => this . _ltypes.join (', ' );
19+ String get args => _largs.join (', ' );
20+ String get hashes => _lhashes.join (', ' );
21+ String get params => _lparams.join (', ' );
22+ String get types => _ltypes.join (', ' );
2323}
2424
2525// ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
@@ -39,10 +39,7 @@ String buildCollectionMapper(
3939 .._largs = Iterable .generate (pLength, (n) => n).map ((n) => 'p$n ' )
4040 .._type = element[1 ];
4141 final argIdMatch = RegExp (r'#x(\d+)' ).firstMatch (output);
42- collectionEvent._nameIndex =
43- argIdMatch != null &&
44- argIdMatch.groupCount >
45- 0 //
42+ collectionEvent._nameIndex = argIdMatch != null && argIdMatch.groupCount > 0 //
4643 ? int .tryParse (argIdMatch.group (1 )! )
4744 : null ;
4845 final xHash = '#x${collectionEvent ._nameIndex }' ;
@@ -86,8 +83,8 @@ final class ObjectMapperEvent extends MapperEvent {
8683 ObjectMapperEvent ();
8784
8885 ObjectMapperEvent .custom (String name, Iterable <String > matchGroups) {
89- this . _name = name;
90- this . _matchGroups = matchGroups;
86+ _name = name;
87+ _matchGroups = matchGroups;
9188 }
9289}
9390
@@ -103,20 +100,19 @@ String? buildObjectMapper(String type, String fieldName, TTypeMappers mappers) {
103100/// Mapper event base class.
104101abstract base class MapperEvent {
105102 /// The name of the field, e.g. "firstName" or "p3".
106- String ? get name =>
107- this ._name ?? (this ._nameIndex != null ? 'p${this ._nameIndex }' : null );
103+ String ? get name => _name ?? (_nameIndex != null ? 'p$_nameIndex ' : null );
108104 String ? _name;
109105
110106 /// The index of the generated field name, e.g. "p3" = 3.
111- int ? get nameIndex => this . _nameIndex;
107+ int ? get nameIndex => _nameIndex;
112108 int ? _nameIndex;
113109
114110 /// The field type, e.g. "String?".
115- String ? get type => this . _type;
111+ String ? get type => _type;
116112 String ? _type;
117113
118114 /// Regex match groups.
119- Iterable <String >? get matchGroups => this . _matchGroups;
115+ Iterable <String >? get matchGroups => _matchGroups;
120116 Iterable <String >? _matchGroups;
121117}
122118
@@ -160,8 +156,7 @@ TTypeMappers filterMappersByType(TTypeMappers mappers, String type) {
160156
161157// ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
162158
163- typedef TTypeMappers <E extends MapperEvent > =
164- Map <String , String Function (E event)>;
159+ typedef TTypeMappers <E extends MapperEvent > = Map <String , String Function (E event)>;
165160
166161TTypeMappers <T > newTypeMap <T extends MapperEvent >(
167162 Map <String , String Function (T )> src,
@@ -177,9 +172,8 @@ TTypeMappers<T> newTypeMap<T extends MapperEvent>(
177172
178173abstract class TypeMappers {
179174 TTypeMappers <MapperEvent > get fromMappers =>
180- {...this .collectionFromMappers, ...this .objectFromMappers}.cast ();
181- TTypeMappers <MapperEvent > get toMappers =>
182- {...this .collectionToMappers, ...this .objectToMappers}.cast ();
175+ {...collectionFromMappers, ...objectFromMappers}.cast ();
176+ TTypeMappers <MapperEvent > get toMappers => {...collectionToMappers, ...objectToMappers}.cast ();
183177 TTypeMappers <CollectionMapperEvent > get collectionFromMappers;
184178 TTypeMappers <CollectionMapperEvent > get collectionToMappers;
185179 TTypeMappers <ObjectMapperEvent > get objectFromMappers;
0 commit comments