global.dart 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586
  1. import 'package:flutter/services.dart';
  2. import 'package:fluwx/fluwx.dart';
  3. import 'package:image/image.dart';
  4. ///设备WIFI前缀,固定的
  5. const String deviceWifiPrefix = "mlg_";
  6. ///Flavor慧视健康
  7. const String flavorHsjk = "hsjk";
  8. ///Flavor慧视通
  9. const String flavorHst = "hst";
  10. ///IOS的appid,默认返回慧视健康的
  11. String get iosAppId =>
  12. switch (appFlavor) { flavorHst => "00000000", _ => "6737254914" };
  13. ///上传接口appid
  14. const String uploadApplicationKey = "GK-KQJ";
  15. ///上传接口文件类型
  16. const String uploadFileType = "oral_mirror_image";
  17. ///Token
  18. String _token = "";
  19. ///Token
  20. String get token => _token;
  21. ///是否有token
  22. bool get hasToken => token.isNotEmpty;
  23. ///更新Token
  24. void updateToken(String str) {
  25. _token = str;
  26. }
  27. ///是否正在同步咨询人数据
  28. bool isSyncingPatient = false;
  29. ///选择的咨询人ID
  30. int selectedPatientId = -1;
  31. ///照片字体
  32. BitmapFont? photoFont;
  33. ///视频channel名字
  34. const String _videoChannelName = "videoControl";
  35. ///文件channel名字
  36. const String _fileChannelName = "fileControl";
  37. ///视频channel
  38. final MethodChannel videoChannel = const MethodChannel(_videoChannelName);
  39. ///文件channel
  40. final MethodChannel fileChannel = const MethodChannel(_fileChannelName);
  41. ///国康RSA加密公钥
  42. final String gkRsaPublicKey = """
  43. -----BEGIN PUBLIC KEY-----
  44. MFwwDQYJKoZIhvcNAQEBBQADSwAwSAJBALltnyc4QcGMQ7/ZT+xmV6x/OXdJ2k5ftatsES9XlScM
  45. fPgs/mANKCixDwNFOIAFvTnKUvGgxVhBXpFL8Ma/J0cCAwEAAQ==
  46. -----END PUBLIC KEY-----
  47. """;
  48. ///国康RSA加密密钥长度
  49. final int gkRsaKeyBitLength = 512;
  50. ///Fluwx实例
  51. final Fluwx fluwx = Fluwx();
  52. ///微信APPid
  53. String get wxAppId => switch (appFlavor) { _ => "" };
  54. ///微信SDK使用的IOS的universalLink
  55. String get wxUniversalLink => switch (appFlavor) { _ => "" };
  56. ///医院小程序ID
  57. String get hospitalMiniProgramId =>
  58. switch (appFlavor) { _ => "gh_ec8e805a6e13" };
  59. ///医院小程序路径
  60. String? get hospitalMiniProgramPath =>
  61. switch (appFlavor) { _ => "index/index?page=BRANCH&id=207001" };