app_config.dart 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119
  1. import 'dart:io';
  2. import 'package:flutter/foundation.dart';
  3. import 'package:location/resource/string.gen.dart';
  4. import '../../resource/assets.gen.dart';
  5. final class BuildConfig {
  6. BuildConfig._();
  7. static bool get isDebug => kDebugMode;
  8. static const String _quickLoginIosBusinessId =
  9. "adc0a4df0dae40e787c6bb76ac635aab";
  10. static const String _quickLoginAndroidBusinessId =
  11. "83c29845ebc04106b186a7396396d97c";
  12. static String get quickLoginBusinessId {
  13. if (Platform.isAndroid) {
  14. return _quickLoginAndroidBusinessId;
  15. } else if (Platform.isIOS) {
  16. return _quickLoginIosBusinessId;
  17. } else {
  18. return '';
  19. }
  20. }
  21. static AssetGenImage get logoImage {
  22. if (Platform.isAndroid) {
  23. return Assets.images.iconLogoAndroid;
  24. } else if (Platform.isIOS) {
  25. return Assets.images.iconLogoIos;
  26. } else {
  27. throw UnsupportedError('Unsupported platform');
  28. }
  29. }
  30. static AssetGenImage get logoMaxImage {
  31. if (Platform.isAndroid) {
  32. return Assets.images.iconLogoAndroidMax;
  33. } else if (Platform.isIOS) {
  34. return Assets.images.iconLogoIosMax;
  35. } else {
  36. throw UnsupportedError('Unsupported platform');
  37. }
  38. }
  39. static String get appName {
  40. if (Platform.isAndroid) {
  41. return StringName.appNameAndroid;
  42. } else {
  43. return StringName.appNameIos;
  44. }
  45. }
  46. }
  47. final class BuglyConfig {
  48. BuglyConfig._();
  49. static const String buglyAndroidAppId = "d53741cbbc";
  50. static const String buglyIosAppId = "38cc655743";
  51. }
  52. final class WechatConfig {
  53. WechatConfig._();
  54. static const String wechatAndroidAppId = 'wx22582503b5cc1854';
  55. static const String wechatIosAppId = 'wxd423dc54a6fd1640';
  56. static String get wechatAppId {
  57. if (Platform.isAndroid) {
  58. return wechatAndroidAppId;
  59. } else if (Platform.isIOS) {
  60. return wechatIosAppId;
  61. } else {
  62. return '';
  63. }
  64. }
  65. }
  66. final class UmengConfig {
  67. UmengConfig._();
  68. //友盟统计配置 android 已在原生配置
  69. static const umengAndroidAppKey = "682c59e7bc47b67d836c25f1";
  70. static const umengIosAppKey = "67e11e7565c707471a29602e";
  71. }
  72. final class GravityConfig {
  73. GravityConfig._();
  74. //引力引擎配置
  75. static const gravityAndroidAppId = "";
  76. static const gravityAndroidAccessToken = "9z0eEcjzcXggkJawmAuqIpypvYsotq7i";
  77. static const gravityIosAppId = "25718036";
  78. static const gravityIosAccessToken = "w9fuUykhmpYsqNrF6Zue8IvCXxmn4vyj";
  79. static String get gravityAppId {
  80. if (Platform.isAndroid) {
  81. return gravityAndroidAppId;
  82. } else if (Platform.isIOS) {
  83. return gravityIosAppId;
  84. } else {
  85. return '';
  86. }
  87. }
  88. static String get gravityAccessToken {
  89. if (Platform.isAndroid) {
  90. return gravityAndroidAccessToken;
  91. } else if (Platform.isIOS) {
  92. return gravityIosAccessToken;
  93. } else {
  94. return '';
  95. }
  96. }
  97. }