tryFromJson static method

Account? tryFromJson(
  1. Map<String, dynamic>? json
)

Creates an instance of this class from the constructor parameters defined in the json object.

Returns null if json is omitted.

Example

class Item extends Serializable {
  const(this.name, this.count);
  final String name;
  final int? count;
}

final Item x = Item.tryFromJson({ 
  'name': 'apple', 
  'count': 10,
});

Implementation

static Account? tryFromJson(final Map<String, dynamic>? json)
  => json != null ? Account.fromJson(json) : null;