$UikThreeDividerPropsFromJson function

UikThreeDividerProps $UikThreeDividerPropsFromJson(
  1. Map<String, dynamic> json
)

Implementation

UikThreeDividerProps $UikThreeDividerPropsFromJson(Map<String, dynamic> json) {
  final UikThreeDividerProps uikThreeDividerProps = UikThreeDividerProps();
  final String? id = jsonConvert.convert<String>(json['id']);
  if (id != null) {
    uikThreeDividerProps.id = id;
  }

  final double? leftMargin = jsonConvert.convert<double>(json['leftMargin']);
  if (leftMargin != null) {
    uikThreeDividerProps.leftMargin = leftMargin;
  }

  final double? rightMargin = jsonConvert.convert<double>(json['rightMargin']);
  if (rightMargin != null) {
    uikThreeDividerProps.rightMargin = rightMargin;
  }

  final double? topMargin = jsonConvert.convert<double>(json['topMargin']);
  if (topMargin != null) {
    uikThreeDividerProps.topMargin = topMargin;
  }

  final double? bottomMargin =
      jsonConvert.convert<double>(json['bottomMargin']);
  if (bottomMargin != null) {
    uikThreeDividerProps.bottomMargin = bottomMargin;
  }

  final String? dividerText = jsonConvert.convert<String>(json['dividerText']);
  if (dividerText != null) {
    uikThreeDividerProps.dividerText = UikDivider(
        WidgetType.UikText, UikDividerProps.fromJson(json['dividerText']));
  }

  final UikAction? action = jsonConvert.convert<UikAction>(json['action']);
  if (action != null) {
    uikThreeDividerProps.action = action;
  }

  return uikThreeDividerProps;
}