$UikTextIconButtonPropsFromJson function

UikTextIconButtonProps $UikTextIconButtonPropsFromJson(
  1. Map<String, dynamic> json
)

Implementation

UikTextIconButtonProps $UikTextIconButtonPropsFromJson(
    Map<String, dynamic> json) {
  final UikTextIconButtonProps uikTextIconButtonProps =
      UikTextIconButtonProps();

  final String? id = jsonConvert.convert<String>(json['id']);
  if (id != null) {
    uikTextIconButtonProps.id = id;
  }
  final String? icon = jsonConvert.convert<String>(json['icon']);
  if (icon != null) {
    uikTextIconButtonProps.icon =
        UikIcon(WidgetType.UikText, UikIconProps.fromJson(json['icon']));
  }
  final String? title = jsonConvert.convert<String>(json['title']);
  if (title != null) {
    uikTextIconButtonProps.title =
        UikText(WidgetType.UikText, UikTextProps.fromJson(json['title']));
  }
  final String? subtitle = jsonConvert.convert<String>(json['subtitle']);
  if (subtitle != null) {
    uikTextIconButtonProps.subtitle =
        UikText(WidgetType.UikText, UikTextProps.fromJson(json['subtitle']));
  }
  final UikAction? action = jsonConvert.convert<UikAction>(json['action']);
  if (action != null) {
    uikTextIconButtonProps.action = action;
  }
  final double? containerWidth =
      jsonConvert.convert<double>(json['containerWidth']);
  if (containerWidth != null) {
    uikTextIconButtonProps.containerWidth = containerWidth;
  }
  return uikTextIconButtonProps;
}