flutter_wxwork 0.0.5 copy "flutter_wxwork: ^0.0.5" to clipboard
flutter_wxwork: ^0.0.5 copied to clipboard

企业微信授权登录flutter插件

flutter_wxwork #

企业微信登录授权flutter插件

使用方式 #

import 'package:flutter_wxwork/flutter_wxwork.dart';

final _flutterWxworkPlugin = FlutterWxwork();

/// 判断是否安装企业微信
bool isInstall = await _flutterWxworkPlugin.isAppInstalled();

/// 初始化(发起授权之前需先进行初始化)
var result = await _flutterWxworkPlugin.register(scheme: 'scheme', corpId: 'corpId', agentId: 'agentId');

/// 调起授权
var result = await _flutterWxworkPlugin.auth();

iOS 配置 #

1.添加需要支持的白名单 ios/Runner/info.plist 增加 key:LSApplicationQueriesSchemes,添加 wxwork。


<key>LSApplicationQueriesSchemes</key>
<array>
    <string>wxwork</string>
</array>

2.在XCode中,选择你的工程设置项,选中“TARGETS”一栏,在“Info”标签栏的“URL Types”添加“URL Schemes”,其内容分别为你的scheme和corpId。

若报错:+[NSData wwkapi_nilobj]

可打开XCode打开项目,TARGETS -> Runner -> Build Settings -> Other Linker Flags添加

$(inherited) -ObjC -l"WXWorkApi"

Android 配置 #

若为android11以上,需要在 android/src/main/AndroidManifest.xml 中添加


<manifest package="com.example.app">
    ...
    // 在应用的AndroidManifest.xml添加如下
    <queries>标签
        <queries>
            <package android:name="com.tencent.wework"/>
            // 指定企业微信包名
        </queries>
        ...
</manifest>
3
likes
0
points
411
downloads

Publisher

verified publisherlibin.zone

Weekly Downloads

企业微信授权登录flutter插件

Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

flutter, plugin_platform_interface

More

Packages that depend on flutter_wxwork