import 'package:flutter/material.dart';

enum EventState {
  idle,
  start,
  finish;

  String toString() {
    return switch (this) {
      EventState.idle => '未开始',
      EventState.start => '进行中',
      EventState.finish => '已结束',
    };
  }

  Color toColor() {
    return switch (this) {
      EventState.idle => Colors.blue,
      EventState.start => Colors.green,
      EventState.finish => Colors.orange,
    };
  }
}
