BarButtonConfiguration.fromJson constructor

BarButtonConfiguration.fromJson(
  1. Map<String, dynamic> json
)

Implementation

factory BarButtonConfiguration.fromJson(Map<String, dynamic> json) =>
    BarButtonConfiguration(
      visible: json.containsKey("visible") ? (json["visible"] as bool) : true,
      title: json.containsKey("title")
          ? StyledText.fromJson(json["title"] as Map<String, dynamic>)
          : StyledText(),
      accessibilityDescription: json.containsKey("accessibilityDescription")
          ? json["accessibilityDescription"] as String
          : "",
      background: json.containsKey("background")
          ? BackgroundStyle.fromJson(
              json["background"] as Map<String, dynamic>)
          : BackgroundStyle(),
      icon: json.containsKey("icon")
          ? IconStyle.fromJson(json["icon"] as Map<String, dynamic>)
          : IconStyle(),
    );