build_config.dart 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. import 'dart:io';
  2. import 'package:flutter/foundation.dart';
  3. class BuildConfig {
  4. BuildConfig._();
  5. static bool get isDebug => kDebugMode;
  6. }
  7. final class UmengConfig {
  8. UmengConfig._();
  9. //友盟统计配置
  10. static const _umengAndroidAppKey = "66b07216cac2a664de82d222";
  11. static const _umengIosAppKey = "66b07337cac2a664de82d457";
  12. static String get umengAppKey {
  13. if (Platform.isAndroid) {
  14. return _umengAndroidAppKey;
  15. } else if (Platform.isIOS) {
  16. return _umengIosAppKey;
  17. } else {
  18. return '';
  19. }
  20. }
  21. }
  22. final class GravityConfig {
  23. GravityConfig._();
  24. //引力引擎配置
  25. static const _gravityAndroidAppId = "24753190";
  26. static const _gravityIosAppId = "29235674";
  27. static const _gravityAndroidAccessToken = "kqrXSfRQFz5ksKLaGoJx7hbfzvul3cte";
  28. static const _gravityIosAccessToken = "ot67ubSa2jInhgrbhuppxwCKsNnejUid";
  29. static String get gravityAppId {
  30. if (Platform.isAndroid) {
  31. return _gravityAndroidAppId;
  32. } else if (Platform.isIOS) {
  33. return _gravityIosAppId;
  34. } else {
  35. return '';
  36. }
  37. }
  38. static String get gravityAccessToken {
  39. if (Platform.isAndroid) {
  40. return _gravityAndroidAccessToken;
  41. } else if (Platform.isIOS) {
  42. return _gravityIosAccessToken;
  43. } else {
  44. return '';
  45. }
  46. }
  47. }