fromJson static method

Font? fromJson(
  1. dynamic jsonObject
)

Allows you to deserialize object.

Implementation

static Font? fromJson(jsonObject) {
  if (jsonObject == null) return null;

  var result = Font(jsonObject["name"]);
  result._size = jsonObject["size"];
  result._style = FontStyle.getByValue(jsonObject["style"]);

  return result;
}