Answers for "Try adding a case clause for the missing constant, or adding a default clause.dartmissing_enum_constant_in_switch."

1

Try adding a case clause for the missing constant, or adding a default clause.dartmissing_enum_constant_in_switch.

// you can just use a default value, or you can add the other values inside the enum:
switch(value) {
  case Enum1: // ....
  default:
  // do something here to avoid the error
}
Posted by: Guest on April-28-2021

Code answers related to "Try adding a case clause for the missing constant, or adding a default clause.dartmissing_enum_constant_in_switch."

Code answers related to "Dart"

Browse Popular Code Answers by Language