decode static method

UISelectInputBlockData? decode(
  1. dynamic json
)

Implementation

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

  return UISelectInputBlockData(
    key: StringDecoder.decode(json['key']),
    options: ListDecoder.decode(
        json['options'], (element) => UISelectInputOption.decode(element)),
    value: StringDecoder.decode(json['value']),
    placeholder: StringDecoder.decode(json['placeholder']),
    size: IntDecoder.decode(json['size']),
    color: Color.decode(json['color']),
    design: FontDesignExtension.decode(json['design']),
    weight: FontWeightExtension.decode(json['weight']),
    textAlign: TextAlignExtension.decode(json['textAlign']),
    frame: FrameData.decode(json['frame']),
  );
}