From 4090e8f5756a38189c8886746a61ed3353b9a15a Mon Sep 17 00:00:00 2001 From: GeJiaXiang <353358601@qq.com> Date: Thu, 1 Feb 2024 14:53:55 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8F=A3=E5=91=B3=F0=9F=98=8B:=20=E6=B7=BB?= =?UTF-8?q?=E5=8A=A0=E9=AB=98=E5=BE=B7=E5=9C=B0=E5=9B=BEkey?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- star_lock/lib/flavors.dart | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) diff --git a/star_lock/lib/flavors.dart b/star_lock/lib/flavors.dart index f893ff5b..08d00904 100644 --- a/star_lock/lib/flavors.dart +++ b/star_lock/lib/flavors.dart @@ -5,6 +5,14 @@ enum Flavor { xhj, } +class StarLockAMapKey { + //iOS平台的key + final String iosKey; + //Android平台的key + final String androidKey; + const StarLockAMapKey({required this.iosKey, required this.androidKey}); +} + class F { static Flavor? appFlavor; @@ -40,4 +48,28 @@ class F { throw Exception('flavor[$name] apiPrefix not found'); } } + // StarLockAMapKey + static StarLockAMapKey get aMapKey { + switch (appFlavor) { + case Flavor.dev: + return const StarLockAMapKey( + androidKey: 'b56b681ee89f4db43a5aa1879ae8cbfe', + iosKey: 'bd4496e6598ef49796e3a80715035b4d'); + case Flavor.pre: + return const StarLockAMapKey( + androidKey: '11d49b3f4fc09c04a02bbb7500925ba2', + iosKey: '883a3355d2d77c2fdc2667030dc97ffe'); + // case Flavor.sky: + // return const StarLockAMapKey( + // androidKey: 'todo', + // iosKey: 'todo'); + // case Flavor.xhj: + // return const StarLockAMapKey( + // androidKey: 'todo', + // iosKey: 'todo'); + default: + throw Exception('flavor[$name] aMapKey not found'); + } + } + }