$UikNavbarPropsFromJson function

UikNavbarProps $UikNavbarPropsFromJson(
  1. Map<String, dynamic> json
)

Implementation

UikNavbarProps $UikNavbarPropsFromJson(Map<String, dynamic> json) {
  final UikNavbarProps uikNavbarProps = UikNavbarProps();

  final String? id = jsonConvert.convert<String>(json['id']);
  if (id != null) {
    uikNavbarProps.id = id;
  }

  final String? size = jsonConvert.convert<String>(json['size']);
  if (size != null) {
    uikNavbarProps.size = size;
  }

  final String? titleText = jsonConvert.convert<String>(json['titleText']);
  if (titleText != null) {
    uikNavbarProps.titleText = titleText;
  }

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

  final String? subtitleText =
      jsonConvert.convert<String>(json['subtitleText']);
  if (subtitleText != null) {
    uikNavbarProps.subtitleText = subtitleText;
  }

  final String? leftIcon = jsonConvert.convert<String>(json['leftIcon']);
  if (leftIcon != null) {
    uikNavbarProps.leftIcon =
        UikIcon(WidgetType.UikText, UikIconProps.fromJson(json['leftIcon']));
  }

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

  final String? triggerElementType =
      jsonConvert.convert<String>(json['triggerElementType']);
  if (triggerElementType != null) {
    uikNavbarProps.triggerElementType = triggerElementType;
  }

  final String? triggerIcon = jsonConvert.convert<String>(json['triggerIcon']);
  if (triggerIcon != null) {
    uikNavbarProps.triggerIcon =
        UikIcon(WidgetType.UikText, UikIconProps.fromJson(json['triggerIcon']));
  }
  final String? triggerButton =
      jsonConvert.convert<String>(json['triggerButton']);
  if (triggerButton != null) {
    uikNavbarProps.triggerButton = UikButton(
        WidgetType.UikText, UikButtonProps.fromJson(json['triggerButton']));
  }

  final String? triggerAction =
      jsonConvert.convert<String>(json['triggerAction']);
  if (triggerAction != null) {
    uikNavbarProps.triggerAction = UikText(
        WidgetType.UikText, UikTextProps.fromJson(json['triggerAction']));
  }

  final String? backgroundColor =
      jsonConvert.convert<String>(json['backgroundColor']);
  if (backgroundColor != null) {
    uikNavbarProps.backgroundColor = backgroundColor.toColor();
  }

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