File tree Expand file tree Collapse file tree 7 files changed +24
-13
lines changed Expand file tree Collapse file tree 7 files changed +24
-13
lines changed Original file line number Diff line number Diff line change 11# Changelog
22
3+ ## [ 0.6.9]
4+
5+ - Released @ 10/2024 (UTC)
6+ - chore: Update dependencies
7+ - docs: Update readme
8+
39## [ 0.6.8]
410
511- Released @ 10/2024 (UTC)
Original file line number Diff line number Diff line change 1- # DF - Generate Dart Models Core
1+ # DF - Generate Dart Models Core (DFMDL)
22
33<a href =" https://www.buymeacoffee.com/robmllze " target =" _blank " ><img align =" right " src =" https://cdn.buymeacoffee.com/buttons/default-orange.png " alt =" Buy Me A Coffee " height =" 41 " width =" 174 " ></a >
44
Original file line number Diff line number Diff line change 77// ▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓
88//.title~
99
10+ // ignore_for_file: annotate_overrides
1011// ignore_for_file: invalid_null_aware_operator
1112// ignore_for_file: overridden_fields
1213// ignore_for_file: require_trailing_commas
@@ -169,7 +170,8 @@ class DataRefModel extends _DataRefModel {
169170 )
170171 .nonNulls
171172 .nullIfEmpty
172- ? .toList ();
173+ ? .toList ()
174+ .unmodifiable;
173175 return DataRefModel (
174176 id: id,
175177 collection: collection,
Original file line number Diff line number Diff line change @@ -212,7 +212,8 @@ class FieldModel extends _FieldModel {
212212 )
213213 .nonNulls
214214 .nullIfEmpty
215- ? .toList ();
215+ ? .toList ()
216+ .unmodifiable;
216217 final fieldType = json? ['fieldType' ];
217218 final nullable = letAsOrNull <bool >(json? ['nullable' ]);
218219 final children = letListOrNull <dynamic >(json? ['children' ])
@@ -225,11 +226,13 @@ class FieldModel extends _FieldModel {
225226 ),
226227 )
227228 .nonNulls
228- .nullIfEmpty,
229+ .nullIfEmpty
230+ ? .unmodifiable,
229231 )
230232 .nonNulls
231233 .nullIfEmpty
232- ? .toList ();
234+ ? .toList ()
235+ .unmodifiable;
233236 final primaryKey = letAsOrNull <bool >(json? ['primaryKey' ]);
234237 final foreignKey = letAsOrNull <bool >(json? ['foreignKey' ]);
235238 final fallback = json? ['fallback' ];
Original file line number Diff line number Diff line change 77// ▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓
88//.title~
99
10+ // ignore_for_file: annotate_overrides
1011// ignore_for_file: invalid_null_aware_operator
1112// ignore_for_file: overridden_fields
1213// ignore_for_file: require_trailing_commas
@@ -196,7 +197,8 @@ class GenerateDartModel extends _GenerateDartModel {
196197 )
197198 .nonNulls
198199 .nullIfEmpty
199- ? .toSet ();
200+ ? .toSet ()
201+ .unmodifiable;
200202 final shouldInherit = letAsOrNull <bool >(json? ['shouldInherit' ]);
201203 final inheritanceConstructor =
202204 json? ['inheritanceConstructor' ]? .toString ().trim ().nullIfEmpty;
Original file line number Diff line number Diff line change 77// ▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓
88//.title~
99
10+ // ignore_for_file: annotate_overrides
1011// ignore_for_file: invalid_null_aware_operator
1112// ignore_for_file: overridden_fields
1213// ignore_for_file: require_trailing_commas
@@ -164,10 +165,7 @@ class ReferencedModel extends _ReferencedModel {
164165 ) {
165166 try {
166167 final id = json? ['id' ]? .toString ().trim ().nullIfEmpty;
167- final ref = () {
168- final a = letMapOrNull <String , dynamic >(json? ['ref' ]);
169- return a != null ? DataRefModel .fromJson (a) : null ;
170- }();
168+ final ref = dataRefFromString (json? ['ref' ]? .toString ());
171169 return ReferencedModel (
172170 id: id,
173171 ref: ref,
@@ -214,7 +212,7 @@ class ReferencedModel extends _ReferencedModel {
214212 }) {
215213 try {
216214 final id0 = id? .trim ().nullIfEmpty;
217- final ref0 = ref? .toJson () ;
215+ final ref0 = ref? .path ;
218216 final withNulls = {
219217 'ref' : ref0,
220218 'id' : id0,
Original file line number Diff line number Diff line change 1212
1313name : df_generate_dart_models_core
1414description : A package that provides core dependencies for models generated with df_generate_dart_models.
15- version : 0.6.8
15+ version : 0.6.9
1616repository : https://github.com/robmllze/df_generate_dart_models_core
1717funding :
1818 - https://www.buymeacoffee.com/robmllze
@@ -31,7 +31,7 @@ environment:
3131# # -----------------------------------------------------------------------------
3232
3333dependencies :
34- df_collection : ^0.8.0
34+ df_collection : ^0.8.1
3535 df_string : ^0.2.2
3636 df_type : ^0.6.2
3737
You can’t perform that action at this time.
0 commit comments