@@ -88,7 +88,10 @@ class RouteConfig {
88
88
}
89
89
90
90
// TODO(kevmoo): validate that this MUST be a subtype of `GoRouteData`
91
- final InterfaceElement classElement = typeParamType.element2;
91
+ // TODO(stuartmorgan): Remove this ignore once 'analyze' can be set to
92
+ // 5.2+ (when Flutter 3.4+ is on stable).
93
+ // ignore: deprecated_member_use
94
+ final InterfaceElement classElement = typeParamType.element;
92
95
93
96
final RouteConfig value = RouteConfig ._(path, classElement, parent);
94
97
@@ -142,7 +145,7 @@ extension $_extensionName on $_className {
142
145
void go(BuildContext context) => context.go(location, extra: this);
143
146
144
147
void push(BuildContext context) => context.push(location, extra: this);
145
- }
148
+ }
146
149
''' ;
147
150
148
151
/// Returns this [RouteConfig] and all child [RouteConfig] instances.
@@ -363,11 +366,17 @@ GoRouteData.\$route(
363
366
String _enumMapConst (InterfaceType type) {
364
367
assert (type.isEnum);
365
368
366
- final String enumName = type.element2.name;
369
+ // TODO(stuartmorgan): Remove this ignore once 'analyze' can be set to
370
+ // 5.2+ (when Flutter 3.4+ is on stable).
371
+ // ignore: deprecated_member_use
372
+ final String enumName = type.element.name;
367
373
368
374
final StringBuffer buffer = StringBuffer ('const ${enumMapName (type )} = {' );
369
375
370
- for (final FieldElement enumField in type.element2.fields
376
+ // TODO(stuartmorgan): Remove this ignore once 'analyze' can be set to
377
+ // 5.2+ (when Flutter 3.4+ is on stable).
378
+ // ignore: deprecated_member_use
379
+ for (final FieldElement enumField in type.element.fields
371
380
.where ((FieldElement element) => element.isEnumConstant)) {
372
381
buffer.writeln (
373
382
'$enumName .${enumField .name }: ${escapeDartString (enumField .name .kebab )},' ,
0 commit comments