build_config.dart 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293
  1. import 'dart:io';
  2. import 'package:flutter/foundation.dart';
  3. import '../../widget/platform_util.dart';
  4. final class BuildConfig{
  5. BuildConfig._();
  6. static bool get isDebug => kDebugMode;
  7. }
  8. final class BuglyConfig {
  9. BuglyConfig._();
  10. static const String buglyAndroidAppId = "a9232adcaa";
  11. static const String buglyIosAppId = "0801c48428";
  12. static const String buglyAndroidAppKey = "0c80072d-13e8-4074-974c-8b1f5eae3979";
  13. static const String buglyIosAppKey = "9828d023-0871-4602-9f6b-e8a12561d99b";
  14. }
  15. final class UmengConfig {
  16. UmengConfig._();
  17. //友盟统计配置
  18. static const umengAndroidAppKey = "680dcdadbc47b67d834e37bb";
  19. static const umengIosAppKey = "680dcf8479267e02104bfa01";
  20. static String get umengAppKey {
  21. if (PlatformUtil.isAndroid) {
  22. return umengAndroidAppKey;
  23. } else if (PlatformUtil.isIOS) {
  24. return umengIosAppKey;
  25. } else {
  26. return '';
  27. }
  28. }
  29. }
  30. final class JpushConfig {
  31. JpushConfig._();
  32. //极光推送配置
  33. static const jpushAndroidAppKey = "e4c8b538fa1046eccce756de";
  34. // 这个不确定是不是ios
  35. static const jpushIosAppKey = " e4c8b538fa1046eccce756de";
  36. static String get jpushAppKey {
  37. if (Platform.isAndroid) {
  38. return jpushAndroidAppKey;
  39. } else if (Platform.isIOS) {
  40. return jpushIosAppKey;
  41. } else {
  42. return '';
  43. }
  44. }
  45. }
  46. final class GravityConfig {
  47. GravityConfig._();
  48. //引力引擎配置
  49. static const gravityAndroidAppId = "26184730";
  50. static const gravityAndroidAccessToken = "YesJRruqje8xzgm5HuOK7AhXwEznTfBV";
  51. static const gravityIosAppId = "21705269";
  52. static const gravityIosAccessToken = "ulA57gz2zpioGukhyiQFkTEjfKS1aPxw";
  53. static String get gravityAppId {
  54. if (PlatformUtil.isAndroid) {
  55. return gravityAndroidAppId;
  56. } else if (PlatformUtil.isIOS) {
  57. return gravityIosAppId;
  58. } else {
  59. return '';
  60. }
  61. }
  62. static String get gravityAccessToken {
  63. if (PlatformUtil.isAndroid) {
  64. return gravityAndroidAccessToken;
  65. } else if (PlatformUtil.isIOS) {
  66. return gravityIosAccessToken;
  67. } else {
  68. return '';
  69. }
  70. }
  71. }