44
55import 'package:analyzer/dart/analysis/declared_variables.dart' ;
66import 'package:analyzer/dart/constant/value.dart' ;
7- import 'package:analyzer/dart/element/element .dart' ;
7+ import 'package:analyzer/dart/element/element2 .dart' ;
88import 'package:analyzer/src/dart/constant/value.dart' ;
99import 'package:analyzer/src/dart/element/type_system.dart' ;
1010
@@ -25,7 +25,7 @@ class FromEnvironmentEvaluator {
2525 DartObjectImpl getBool2 (
2626 String ? name,
2727 Map <String , DartObjectImpl > namedValues,
28- ConstructorElement constructor,
28+ ConstructorElement2 constructor,
2929 ) {
3030 var str = name != null ? _declaredVariables.get (name) : null ;
3131 if (str == 'true' ) {
@@ -55,7 +55,7 @@ class FromEnvironmentEvaluator {
5555 DartObjectImpl getInt2 (
5656 String ? name,
5757 Map <String , DartObjectImpl > namedValues,
58- ConstructorElement constructor,
58+ ConstructorElement2 constructor,
5959 ) {
6060 var str = name != null ? _declaredVariables.get (name) : null ;
6161 if (str != null ) {
@@ -98,7 +98,7 @@ class FromEnvironmentEvaluator {
9898 DartObjectImpl getString2 (
9999 String ? name,
100100 Map <String , DartObjectImpl > namedValues,
101- ConstructorElement constructor,
101+ ConstructorElement2 constructor,
102102 ) {
103103 var str = name != null ? _declaredVariables.get (name) : null ;
104104 if (str != null ) {
@@ -138,9 +138,9 @@ class FromEnvironmentEvaluator {
138138 }
139139
140140 static DartObjectImpl _defaultValueDefaultValue (
141- ConstructorElement constructor) {
142- return constructor.parameters
143- .singleWhere ((parameter) => parameter.name == _defaultValue)
141+ ConstructorElement2 constructor) {
142+ return constructor.formalParameters
143+ .singleWhere ((parameter) => parameter.name3 == _defaultValue)
144144 .computeConstantValue () as DartObjectImpl ;
145145 }
146146}
0 commit comments