@@ -157,8 +157,8 @@ List<String> _helperParams(
157157 final args = < String > [];
158158
159159 for (var helperArg in rest) {
160- final typeParamIndex = type.element.typeParameters .indexOf (
161- helperArg.element ,
160+ final typeParamIndex = type.element3.typeParameters2 .indexOf (
161+ helperArg.element3 ,
162162 );
163163
164164 // TODO: throw here if `typeParamIndex` is -1 ?
@@ -181,7 +181,7 @@ TypeParameterType _decodeHelper(
181181 type.normalParameterTypes.length == 1 ) {
182182 final funcReturnType = type.returnType;
183183
184- if (param.name3 == fromJsonForName (funcReturnType.element ! .name ! )) {
184+ if (param.name3 == fromJsonForName (funcReturnType.element3 ! .name3 ! )) {
185185 final funcParamType = type.normalParameterTypes.single;
186186
187187 if ((funcParamType.isDartCoreObject && funcParamType.isNullableType) ||
@@ -212,7 +212,7 @@ TypeParameterType _encodeHelper(
212212 type.normalParameterTypes.length == 1 ) {
213213 final funcParamType = type.normalParameterTypes.single;
214214
215- if (param.name3 == toJsonForName (funcParamType.element ! .name ! )) {
215+ if (param.name3 == toJsonForName (funcParamType.element3 ! .name3 ! )) {
216216 if (funcParamType is TypeParameterType ) {
217217 return funcParamType;
218218 }
@@ -252,7 +252,7 @@ InterfaceType? _instantiate(
252252 InterfaceType classType,
253253) {
254254 final argTypes = ctorParamType.typeArguments.map ((arg) {
255- final typeParamIndex = classType.element.typeParameters .indexWhere (
255+ final typeParamIndex = classType.element3.typeParameters2 .indexWhere (
256256 // TODO: not 100% sure `nullabilitySuffix` is right
257257 (e) => e.instantiate (nullabilitySuffix: arg.nullabilitySuffix) == arg,
258258 );
@@ -269,7 +269,7 @@ InterfaceType? _instantiate(
269269 return null ;
270270 }
271271
272- return ctorParamType.element .instantiate (
272+ return ctorParamType.element3 .instantiate (
273273 typeArguments: argTypes.cast <DartType >(),
274274 nullabilitySuffix: ctorParamType.nullabilitySuffix,
275275 );
0 commit comments