ReviewMorePopupMenu.fromJson constructor

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

Implementation

factory ReviewMorePopupMenu.fromJson(Map<String, dynamic> json) =>
    ReviewMorePopupMenu(
      backgroundColor: json.containsKey("backgroundColor")
          ? ScanbotColor(json["backgroundColor"] as String)
          : ScanbotColor("?sbColorSurface"),
      reorderPages: json.containsKey("reorderPages")
          ? PopupMenuItem.fromJson(
              json["reorderPages"] as Map<String, dynamic>)
          : PopupMenuItem(
              title: StyledText(
                  text: "?reviewScreenReorderPagesButtonTitle",
                  color: ScanbotColor("?sbColorOnSurface")),
              accessibilityDescription:
                  "?accessibilityDescriptionReviewReorderPagesButton",
              icon: IconStyle(color: ScanbotColor("?sbColorOnSurface"))),
      deleteAll: json.containsKey("deleteAll")
          ? PopupMenuItem.fromJson(json["deleteAll"] as Map<String, dynamic>)
          : PopupMenuItem(
              title: StyledText(
                  text: "?reviewScreenDeleteAllButtonTitle",
                  color: ScanbotColor("?sbColorNegative")),
              accessibilityDescription:
                  "?accessibilityDescriptionReviewDeleteAllButton",
              icon: IconStyle(color: ScanbotColor("?sbColorNegative"))),
    );