Property.fromJson constructor

Property.fromJson(
  1. Object? j
)

Implementation

factory Property.fromJson(Object? j) {
  final json = j as Map<String, Object?>;
  return Property(
    name: switch (json['name']) {
      null => '',
      Object $1 => decodeString($1),
    },
    type: switch (json['type']) {
      null => Property_PropertyType.$default,
      Object $1 => Property_PropertyType.fromJson($1),
    },
    description: switch (json['description']) {
      null => '',
      Object $1 => decodeString($1),
    },
  );
}