| 1234567891011121314151617181920212223 |
- enum ProtocolType {
- USER,
- VIP,
- PRIVATE,
- }
- class Protocols {
- static Map<ProtocolType, String> protocols = {
- ProtocolType.USER : 'Here is user protocol',
- ProtocolType.VIP: 'Welcome ! Here is VIP protocol',
- ProtocolType.PRIVATE: 'Welcome ! Here is private protocol',
- };
- static Map<ProtocolType, String> protocolNames = {
- ProtocolType.USER : '用户注册协议',
- ProtocolType.VIP: '美天旺会员协议',
- ProtocolType.PRIVATE: '隐私政策',
- };
- static String getType(ProtocolType type) => protocols[type];
- static String getTitle(ProtocolType type) => protocolNames[type];
- }
|