File tree Expand file tree Collapse file tree 9 files changed +46
-20
lines changed Expand file tree Collapse file tree 9 files changed +46
-20
lines changed Original file line number Diff line number Diff line change 1+ ## 1.5.2
2+
3+ * Add deepCopy option
4+
15## 1.5.1
26
37* Fix copyProperty isEmpty case
Original file line number Diff line number Diff line change 6161 "equalityMethodType":"Equality Method Type",
6262 "none":"non-generate",
6363 "official":"official",
64- "equatable":"equatable"
64+ "equatable":"equatable",
65+ "deepCopy":"deepCopy"
6566}
Original file line number Diff line number Diff line change 6161 "equalityMethodType":"对比相等方法类型",
6262 "none":"不生成",
6363 "official":"官方方式",
64- "equatable":"Equatable 的方式"
64+ "equatable":"Equatable 的方式",
65+ "deepCopy":"深复制"
6566}
Original file line number Diff line number Diff line change 6161 "equalityMethodType":"對比相等方法類型",
6262 "none":"不生成",
6363 "official":"官方方式",
64- "equatable":"Equatable 的方式"
64+ "equatable":"Equatable 的方式",
65+ "deepCopy":"深複製"
6566}
Original file line number Diff line number Diff line change @@ -66,6 +66,8 @@ class ConfigSetting extends Setting<ConfigSetting> {
6666 @HiveField (20 )
6767 Rx <EqualityMethodType > equalityMethodType = EqualityMethodType .official.obs;
6868
69+ @HiveField (21 )
70+ RxBool deepCopy = false .obs;
6971 @override
7072 Future <void > init ({
7173 TypeAdapter <ConfigSetting >? adapter,
Original file line number Diff line number Diff line change @@ -371,7 +371,8 @@ class DartObject extends DartProperty {
371371 typeString += '?' ;
372372 }
373373
374- if (ConfigSetting ().addCopyMethod.value) {
374+ if (ConfigSetting ().addCopyMethod.value &&
375+ ConfigSetting ().deepCopy.value) {
375376 if (! ConfigSetting ().nullsafety.value || item.nullable) {
376377 copyProperty += '?' ;
377378 }
@@ -404,7 +405,8 @@ class DartObject extends DartProperty {
404405 }
405406 }
406407 setString += ',' ;
407- if (ConfigSetting ().addCopyMethod.value)
408+ if (ConfigSetting ().addCopyMethod.value &&
409+ ConfigSetting ().deepCopy.value)
408410 copyProperty = item.getListCopy (className: className);
409411 } else {
410412 setString = DartHelper .setProperty (
Original file line number Diff line number Diff line change @@ -281,6 +281,18 @@ class MoreSetting extends StatelessWidget {
281281 },
282282 );
283283 }),
284+ Obx (() {
285+ return StCheckBox (
286+ title: appLocalizations.deepCopy,
287+ value: ConfigSetting ().deepCopy.value,
288+ onChanged: (bool value) {
289+ if (ConfigSetting ().deepCopy.value != value) {
290+ ConfigSetting ().deepCopy.value = value;
291+ ConfigSetting ().save ();
292+ }
293+ },
294+ );
295+ }),
284296 Obx (() {
285297 return StCheckBox (
286298 title: appLocalizations.automaticCheck,
Original file line number Diff line number Diff line change @@ -11,13 +11,12 @@ description: The tool to convert json to dart code.
1111# In iOS, build-name is used as CFBundleShortVersionString while build-number used as CFBundleVersion.
1212# Read more about iOS versioning at
1313# https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html
14- version : 1.5.1
14+ version : 1.5.2
1515
1616environment :
17- sdk : ' >=3.5.0 <4.0.0'
17+ sdk : " >=3.5.0 <4.0.0"
1818 flutter : " >=3.24.1"
1919dependencies :
20-
2120 # collection: any
2221 # The following adds the Cupertino Icons font to your application.
2322 # Use with the CupertinoIcons class for iOS style icons.
@@ -28,29 +27,28 @@ dependencies:
2827 flutter :
2928 sdk : flutter
3029 flutter_localizations :
31- sdk : flutter
32- flutter_smart_dialog : any
30+ sdk : flutter
31+ flutter_smart_dialog : any
3332 flutter_spinkit : any
3433 get : any
3534 hive : any
36- hive_flutter : any
35+ hive_flutter : any
3736 intl : any
3837 nested : any
3938
40-
4139# dependency_overrides:
42- # dart_style: ^2.0.0
40+ # dart_style: ^2.0.0
4341dev_dependencies :
4442 build_runner : any
4543 flutter_native_splash : any
4644 flutter_test :
4745 sdk : flutter
48- # hive_generator: any
49- # hive_generator:
46+ # hive_generator: any
47+ # hive_generator:
5048 # git:
5149 # url: https://github.com/zmtzawqlp/hive.git
5250 # path: hive_generator
53- # hive_generator:
51+ # hive_generator:
5452 # git:
5553 # url: https://gitee.com/zmtzawqlp/hive.git
5654 # path: hive_generator
@@ -65,7 +63,7 @@ flutter:
6563 # the material Icons class.
6664 uses-material-design : true
6765 generate : true
68-
66+
6967 # fonts:
7068 # - family: Roboto
7169 # fonts:
@@ -113,4 +111,4 @@ flutter:
113111# flutter pub run flutter_native_splash:remove
114112flutter_native_splash :
115113 color : " #42a5f5"
116- image : web/favicon.png
114+ image : web/favicon.png
You can’t perform that action at this time.
0 commit comments