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