build_config.dart 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990
  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 = "0801c48428";
  11. static const String buglyIosAppId = "a9232adcaa";
  12. }
  13. final class UmengConfig {
  14. UmengConfig._();
  15. //友盟统计配置
  16. static const umengAndroidAppKey = "680dcdadbc47b67d834e37bb";
  17. static const umengIosAppKey = "680dcf8479267e02104bfa01";
  18. static String get umengAppKey {
  19. if (PlatformUtil.isAndroid) {
  20. return umengAndroidAppKey;
  21. } else if (PlatformUtil.isIOS) {
  22. return umengIosAppKey;
  23. } else {
  24. return '';
  25. }
  26. }
  27. }
  28. final class JpushConfig {
  29. JpushConfig._();
  30. //极光推送配置
  31. static const jpushAndroidAppKey = "e4c8b538fa1046eccce756de";
  32. // 这个不确定是不是ios
  33. static const jpushIosAppKey = " e4c8b538fa1046eccce756de";
  34. static String get jpushAppKey {
  35. if (Platform.isAndroid) {
  36. return jpushAndroidAppKey;
  37. } else if (Platform.isIOS) {
  38. return jpushIosAppKey;
  39. } else {
  40. return '';
  41. }
  42. }
  43. }
  44. final class GravityConfig {
  45. GravityConfig._();
  46. //引力引擎配置
  47. static const gravityAndroidAppId = "";
  48. static const gravityAndroidAccessToken = "YesJRruqje8xzgm5HuOK7AhXwEznTfBV";
  49. static const gravityIosAppId = "";
  50. static const gravityIosAccessToken = "ulA57gz2zpioGukhyiQFkTEjfKS1aPxw";
  51. static String get gravityAppId {
  52. if (PlatformUtil.isAndroid) {
  53. return gravityAndroidAppId;
  54. } else if (PlatformUtil.isIOS) {
  55. return gravityIosAppId;
  56. } else {
  57. return '';
  58. }
  59. }
  60. static String get gravityAccessToken {
  61. if (PlatformUtil.isAndroid) {
  62. return gravityAndroidAccessToken;
  63. } else if (PlatformUtil.isIOS) {
  64. return gravityIosAccessToken;
  65. } else {
  66. return '';
  67. }
  68. }
  69. }