fromLabel static method

DashEvent? fromLabel(
  1. String label
)

This takes in the string label for a given DashEvent and returns the enum for that string label.

Implementation

static DashEvent? fromLabel(String label) =>
    DashEvent.values.where((e) => e.label == label).firstOrNull;