$UikPageControlPropsFromJson function

UikPageControlProps $UikPageControlPropsFromJson(
  1. Map<String, dynamic> json
)

Implementation

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

  final List<Widget>? list = jsonConvert.convert<List<Widget>>(json['list']);
  if (list != null) {
    uikPageControlProps.list = list;
  }

  final String? dotColor = jsonConvert.convert<String>(json['dotColor']);
  if (dotColor != null) {
    uikPageControlProps.dotColor = Color(int.parse(dotColor));
  }

  final String? activeDotColor =
      jsonConvert.convert<String>(json['activeDotColor']);
  if (activeDotColor != null) {
    uikPageControlProps.activeDotColor = Color(int.parse(activeDotColor));
  }

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

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

  final bool? isBackground = jsonConvert.convert<bool>(json['isBackground']);
  if (isBackground != null) {
    uikPageControlProps.isBackground = isBackground;
  }

  final String? backgroundColor =
      jsonConvert.convert<String>(json['backgroundColor']);
  if (backgroundColor != null) {
    uikPageControlProps.backgroundColor = Color(int.parse(backgroundColor));
  }

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

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

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

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

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