@@ -37,7 +37,8 @@ Future<List<ClassInsight<GenerateDartModel>>> extractInsightsFromFile(
3737 await analyzer.analyze (
3838 inclClassAnnotations: {GenerateDartModel .CLASS_NAME },
3939 inclMemberAnnotations: {Field .CLASS_NAME },
40- onClassAnnotationField: (p) async => temp = _updateFromClassAnnotationField (temp, p),
40+ onClassAnnotationField: (p) async =>
41+ temp = _updateFromClassAnnotationField (temp, p),
4142 onAnnotatedMember: (p) async => temp = _updateFromAnnotatedMember (temp, p),
4243 onPreAnalysis: (_, className) => temp = const GenerateDartModel (fields: {}),
4344 onPostAnalysis: (params) {
@@ -141,23 +142,33 @@ GenerateDartModel _updateFromAnnotatedMember(
141142 params.memberAnnotationFields[FieldModelFieldNames .fieldPath],
142143 );
143144 final a2 = [params.memberName];
144- final b1 = params.memberAnnotationFields[FieldModelFieldNames .fieldType]? .toStringValue ();
145+ final b1 = params.memberAnnotationFields[FieldModelFieldNames .fieldType]
146+ ? .toStringValue ();
145147 // ignore: deprecated_member_use
146148 final b2 = params.memberType.getDisplayString (withNullability: false );
147- final nullable = params.memberAnnotationFields[FieldModelFieldNames .nullable]? .toBoolValue ();
148- final primaryKey =
149- params.memberAnnotationFields[FieldModelFieldNames .primaryKey]? .toBoolValue ();
150- final foreignKey =
151- params.memberAnnotationFields[FieldModelFieldNames .foreignKey]? .toBoolValue ();
152- final children = (dartObjToObject (
153- params.memberAnnotationFields[FieldModelFieldNames .children],
154- ) as List ? )
155- ? .map ((e) => (e as Map ).map ((k, v) => MapEntry (k.toString (), v)))
156- .nonNulls
157- .toList ();
158- final fallback = params.memberAnnotationFields[FieldModelFieldNames .fallback]? .toListValue ();
159- final description =
160- params.memberAnnotationFields[FieldModelFieldNames .description]? .toStringValue ();
149+ final nullable = params
150+ .memberAnnotationFields[FieldModelFieldNames .nullable]
151+ ? .toBoolValue ();
152+ final primaryKey = params
153+ .memberAnnotationFields[FieldModelFieldNames .primaryKey]
154+ ? .toBoolValue ();
155+ final foreignKey = params
156+ .memberAnnotationFields[FieldModelFieldNames .foreignKey]
157+ ? .toBoolValue ();
158+ final children =
159+ (dartObjToObject (
160+ params.memberAnnotationFields[FieldModelFieldNames .children],
161+ )
162+ as List ? )
163+ ? .map ((e) => (e as Map ).map ((k, v) => MapEntry (k.toString (), v)))
164+ .nonNulls
165+ .toList ();
166+ final fallback = params
167+ .memberAnnotationFields[FieldModelFieldNames .fallback]
168+ ? .toListValue ();
169+ final description = params
170+ .memberAnnotationFields[FieldModelFieldNames .description]
171+ ? .toStringValue ();
161172 final field = DartField (
162173 fieldPath: a1 ?? a2,
163174 fieldType: b1 ?? b2,
0 commit comments