protocols.dart 640 B

1234567891011121314151617181920212223
  1. enum ProtocolType {
  2. USER,
  3. VIP,
  4. PRIVATE,
  5. }
  6. class Protocols {
  7. static Map<ProtocolType, String> protocols = {
  8. ProtocolType.USER : 'Here is user protocol',
  9. ProtocolType.VIP: 'Welcome ! Here is VIP protocol',
  10. ProtocolType.PRIVATE: 'Welcome ! Here is private protocol',
  11. };
  12. static Map<ProtocolType, String> protocolNames = {
  13. ProtocolType.USER : '用户注册协议',
  14. ProtocolType.VIP: '美天旺会员协议',
  15. ProtocolType.PRIVATE: '隐私政策',
  16. };
  17. static String getType(ProtocolType type) => protocols[type];
  18. static String getTitle(ProtocolType type) => protocolNames[type];
  19. }