build_config.dart 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  1. import 'dart:io';
  2. import 'package:flutter/foundation.dart';
  3. final class BuildConfig {
  4. BuildConfig._();
  5. static bool get isDebug => kDebugMode;
  6. }
  7. final class BuglyConfig {
  8. BuglyConfig._();
  9. static const String buglyAndroidAppId = "d53741cbbc";
  10. static const String buglyIosAppId = "";
  11. }
  12. final class WechatConfig {
  13. WechatConfig._();
  14. static const String wechatAppId = 'wx22582503b5cc1854';
  15. }
  16. final class UmengConfig {
  17. UmengConfig._();
  18. //友盟统计配置
  19. static const umengAndroidAppKey = "682c59e7bc47b67d836c25f1";
  20. static const umengIosAppKey = "";
  21. static String get umengAppKey {
  22. if (Platform.isAndroid) {
  23. return umengAndroidAppKey;
  24. } else if (Platform.isIOS) {
  25. return umengIosAppKey;
  26. } else {
  27. return '';
  28. }
  29. }
  30. }
  31. final class GravityConfig {
  32. GravityConfig._();
  33. //引力引擎配置
  34. static const gravityAndroidAppId = "";
  35. static const gravityAndroidAccessToken = "9z0eEcjzcXggkJawmAuqIpypvYsotq7i";
  36. static const gravityIosAppId = "";
  37. static const gravityIosAccessToken = "w9fuUykhmpYsqNrF6Zue8IvCXxmn4vyj";
  38. static String get gravityAppId {
  39. if (Platform.isAndroid) {
  40. return gravityAndroidAppId;
  41. } else if (Platform.isIOS) {
  42. return gravityIosAppId;
  43. } else {
  44. return '';
  45. }
  46. }
  47. static String get gravityAccessToken {
  48. if (Platform.isAndroid) {
  49. return gravityAndroidAccessToken;
  50. } else if (Platform.isIOS) {
  51. return gravityIosAccessToken;
  52. } else {
  53. return '';
  54. }
  55. }
  56. }