mirror of
https://github.com/RxReader/tencent_kit.git
synced 2025-05-20 00:36:42 +08:00
授权
This commit is contained in:
@ -12,8 +12,6 @@ const String _TENCENT_APPID = 'your tencent appId';
|
||||
|
||||
void main() {
|
||||
WidgetsFlutterBinding.ensureInitialized();
|
||||
// 3.1.0 之后的版本请先获取权限
|
||||
await Tencent.instance.setIsPermissionGranted(granted: true);
|
||||
Tencent.instance.registerApp(appId: _TENCENT_APPID);
|
||||
runApp(MyApp());
|
||||
}
|
||||
@ -78,6 +76,13 @@ class _HomeState extends State<Home> {
|
||||
_showTips('环境检查', content);
|
||||
},
|
||||
),
|
||||
ListTile(
|
||||
title: const Text('3.1.0 之后的版本请先获取权限'),
|
||||
onTap: () async {
|
||||
await Tencent.instance.setIsPermissionGranted(granted: true);
|
||||
_showTips('授权', '已授权获取设备信息/同意隐私协议');
|
||||
},
|
||||
),
|
||||
ListTile(
|
||||
title: const Text('登录'),
|
||||
onTap: () {
|
||||
|
Reference in New Issue
Block a user