build_config.dart 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  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 GravityConfig {
  29. GravityConfig._();
  30. //引力引擎配置
  31. static const gravityAndroidAppId = "";
  32. static const gravityAndroidAccessToken = "YesJRruqje8xzgm5HuOK7AhXwEznTfBV";
  33. static const gravityIosAppId = "";
  34. static const gravityIosAccessToken = "ulA57gz2zpioGukhyiQFkTEjfKS1aPxw";
  35. static String get gravityAppId {
  36. if (PlatformUtil.isAndroid) {
  37. return gravityAndroidAppId;
  38. } else if (PlatformUtil.isIOS) {
  39. return gravityIosAppId;
  40. } else {
  41. return '';
  42. }
  43. }
  44. static String get gravityAccessToken {
  45. if (PlatformUtil.isAndroid) {
  46. return gravityAndroidAccessToken;
  47. } else if (PlatformUtil.isIOS) {
  48. return gravityIosAccessToken;
  49. } else {
  50. return '';
  51. }
  52. }
  53. }