decode static method

UITextBlockData? decode(
  1. dynamic json
)

Implementation

static UITextBlockData? decode(dynamic json) {
  if (json == null) {
    return null;
  }
  if (json is! Map<String, dynamic>) {
    return null;
  }

  return UITextBlockData(
    value: StringDecoder.decode(json['value']),
    size: IntDecoder.decode(json['size']),
    color: Color.decode(json['color']),
    design: FontDesignExtension.decode(json['design']),
    weight: FontWeightExtension.decode(json['weight']),
    maxLines: IntDecoder.decode(json['maxLines']),
    frame: FrameData.decode(json['frame']),
    onClick: UIBlockEventDispatcher.decode(json['onClick']),
  );
}