枚举
最基本的使用
enum COLOR{
RED,BLUE,YELLOW,GREEN,BLACK,GRAY,PINK,WHITE;
}
复杂点的枚举
enum Color {
WHITE( 0xF8F8FF ),PINK( 0xFFC0CB ),BLUE( 0x0000FF );
// 构造器
const Color(int this.value);
final int value;
}
标签:PINK,int,enum,Dart,枚举,WHITE
From: https://www.cnblogs.com/JarryShu/p/17221474.html