@@ -18,7 +18,7 @@ import '/src/_index.g.dart';
18
18
19
19
// ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
20
20
21
- Future <List <_ClassInsight >> extractClassInsightsFromDartFile (
21
+ Future <List <ClassInsight < ModelGenerateScreenBindings > >> extractClassInsightsFromDartFile (
22
22
AnalysisContextCollection analysisContextCollection,
23
23
String filePath,
24
24
) async {
@@ -28,17 +28,16 @@ Future<List<_ClassInsight>> extractClassInsightsFromDartFile(
28
28
analysisContextCollection: analysisContextCollection,
29
29
);
30
30
31
- final insights = < _ClassInsight > [];
31
+ final insights = < ClassInsight < ModelGenerateScreenBindings > > [];
32
32
await analyzer.analyze (
33
33
inclClassAnnotations: {ModelGenerateScreenBindingsFieldNames .className},
34
- onClassAnnotationField: (params) async =>
35
- temp = _updateFromClassAnnotationField (temp, params),
34
+ onClassAnnotationField: (params) async => temp = _updateFromClassAnnotationField (temp, params),
36
35
onPreAnalysis: (_, __) => temp = const ModelGenerateScreenBindings (),
37
36
onPostAnalysis: (params) {
38
37
final fullPathName = params.fullFilePath;
39
38
final fileName = p.basename (fullPathName);
40
39
final dirPath = p.dirname (fullPathName);
41
- final insight = _ClassInsight (
40
+ final insight = ClassInsight < ModelGenerateScreenBindings > (
42
41
className: params.className,
43
42
annotation: temp,
44
43
dirPath: dirPath,
@@ -65,12 +64,10 @@ ModelGenerateScreenBindings _updateFromClassAnnotationField(
65
64
),
66
65
),
67
66
);
68
- case ModelGenerateScreenBindingsFieldNames
69
- .isAccessibleOnlyIfLoggedInAndVerified:
67
+ case ModelGenerateScreenBindingsFieldNames .isAccessibleOnlyIfLoggedInAndVerified:
70
68
return annotation.copyWith (
71
69
ModelGenerateScreenBindings (
72
- isAccessibleOnlyIfLoggedInAndVerified:
73
- params.fieldValue.toBoolValue (),
70
+ isAccessibleOnlyIfLoggedInAndVerified: params.fieldValue.toBoolValue (),
74
71
),
75
72
);
76
73
case ModelGenerateScreenBindingsFieldNames .isAccessibleOnlyIfLoggedIn:
@@ -157,7 +154,3 @@ ModelGenerateScreenBindings _updateFromClassAnnotationField(
157
154
return ModelGenerateScreenBindings .of (annotation);
158
155
}
159
156
}
160
-
161
- // ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
162
-
163
- typedef _ClassInsight = ClassInsight <ModelGenerateScreenBindings >;
0 commit comments