Sheet.fromJson constructor

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

Implementation

factory Sheet.fromJson(Map<String, dynamic> json) => Sheet(
      mode: json.containsKey("mode")
          ? SheetMode.values.byName(json["mode"] as String)
          : SheetMode.COLLAPSED_SHEET,
      collapsedVisibleHeight: json.containsKey("collapsedVisibleHeight")
          ? CollapsedVisibleHeight.values
              .byName(json["collapsedVisibleHeight"] as String)
          : CollapsedVisibleHeight.SMALL,
      listButton: json.containsKey("listButton")
          ? BadgedButton.fromJson(json["listButton"] as Map<String, dynamic>)
          : BadgedButton(),
    );