@arrirpc/codegen-dart 0.79.0 → 0.80.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.cjs CHANGED
@@ -266,13 +266,9 @@ function dartClassFromSchema(schema, context) {
266
266
  defaultValue,
267
267
  fromJson(input) {
268
268
  if (isNullable) {
269
- return `${input} is Map<String, dynamic>
270
- ? ${finalClassName}.fromJson(${input})
271
- : null`;
269
+ return `${input} is Map<String, dynamic> ? ${finalClassName}.fromJson(${input}) : null`;
272
270
  }
273
- return `${input} is Map<String, dynamic>
274
- ? ${finalClassName}.fromJson(${input})
275
- : ${finalClassName}.empty()`;
271
+ return `${input} is Map<String, dynamic> ? ${finalClassName}.fromJson(${input}) : ${finalClassName}.empty()`;
276
272
  },
277
273
  toJson(input) {
278
274
  if (context.isOptional) {
@@ -520,13 +516,9 @@ function dartSealedClassFromSchema(schema, context) {
520
516
  defaultValue,
521
517
  fromJson(input) {
522
518
  if (isNullable) {
523
- return `${input} is Map<String, dynamic>
524
- ? ${finalClassName}.fromJson(${input})
525
- : null`;
519
+ return `${input} is Map<String, dynamic> ? ${finalClassName}.fromJson(${input}) : null`;
526
520
  }
527
- return `${input} is Map<String, dynamic>
528
- ? ${finalClassName}.fromJson(${input})
529
- : ${finalClassName}.empty()`;
521
+ return `${input} is Map<String, dynamic> ? ${finalClassName}.fromJson(${input}) : ${finalClassName}.empty()`;
530
522
  },
531
523
  toJson(input) {
532
524
  if (context.isOptional) {
package/dist/index.mjs CHANGED
@@ -259,13 +259,9 @@ function dartClassFromSchema(schema, context) {
259
259
  defaultValue,
260
260
  fromJson(input) {
261
261
  if (isNullable) {
262
- return `${input} is Map<String, dynamic>
263
- ? ${finalClassName}.fromJson(${input})
264
- : null`;
262
+ return `${input} is Map<String, dynamic> ? ${finalClassName}.fromJson(${input}) : null`;
265
263
  }
266
- return `${input} is Map<String, dynamic>
267
- ? ${finalClassName}.fromJson(${input})
268
- : ${finalClassName}.empty()`;
264
+ return `${input} is Map<String, dynamic> ? ${finalClassName}.fromJson(${input}) : ${finalClassName}.empty()`;
269
265
  },
270
266
  toJson(input) {
271
267
  if (context.isOptional) {
@@ -513,13 +509,9 @@ function dartSealedClassFromSchema(schema, context) {
513
509
  defaultValue,
514
510
  fromJson(input) {
515
511
  if (isNullable) {
516
- return `${input} is Map<String, dynamic>
517
- ? ${finalClassName}.fromJson(${input})
518
- : null`;
512
+ return `${input} is Map<String, dynamic> ? ${finalClassName}.fromJson(${input}) : null`;
519
513
  }
520
- return `${input} is Map<String, dynamic>
521
- ? ${finalClassName}.fromJson(${input})
522
- : ${finalClassName}.empty()`;
514
+ return `${input} is Map<String, dynamic> ? ${finalClassName}.fromJson(${input}) : ${finalClassName}.empty()`;
523
515
  },
524
516
  toJson(input) {
525
517
  if (context.isOptional) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@arrirpc/codegen-dart",
3
- "version": "0.79.0",
3
+ "version": "0.80.0",
4
4
  "type": "module",
5
5
  "license": "MIT",
6
6
  "author": {
@@ -23,6 +23,6 @@
23
23
  ],
24
24
  "dependencies": {
25
25
  "pathe": "^2.0.3",
26
- "@arrirpc/codegen-utils": "0.79.0"
26
+ "@arrirpc/codegen-utils": "0.80.0"
27
27
  }
28
28
  }