BorderDashStyle.fromJson constructor

BorderDashStyle.fromJson(
  1. dynamic data
)

Creates a BorderDashStyle instance from a JSON representation.

Implementation

BorderDashStyle.fromJson(dynamic data) {
  switch (data) {
    case "Solid":
    case "Dash":
    case "Dot":
    case "DashDot":
    case "DashDotDot":
      _value = data;
      break;
    default:
      throw Exception('Unknown enum value to decode: $data');
  }
}