Skip to content

szfrank/fluwx

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

logo

适用于Flutter的微信SDK,方便快捷。

使用需知

使用Fluwx之前,强烈建议先阅读微信SDK官方文档, 这有助于你使用Fluwx

目前功能

  • 文本分享。
  • 网站分享。
  • 图片分享。
  • 音乐分享。
  • 视频分享。
  • 小程序分享。
  • 发送Auth认证。

技术参数

Android部分使用到了kotlin-1.2.60。以下是Android部分所涉及到的技术:

 api 'com.tencent.mm.opensdk:wechat-sdk-android-with-mta:5.1.4'
 implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-core:0.24.0'
 implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-android:0.24.0'
 implementation 'top.zibin:Luban:1.1.8'
 implementation 'com.squareup.okhttp3:okhttp:3.11.0'

iOS部分涉及到的技术:

 s.dependency 'WechatOpenSDK','~> 1.8.2'

Flutter版本信息

Flutter 0.7.5 • channel dev • https://github.com/flutter/flutter.git
Framework • revision eab5cd9853 (4 days ago) • 2018-08-30 14:47:04 -0700
Engine • revision dc7b5eb89d
Tools • Dart 2.1.0-dev.3.0.flutter-760a9690c2

引入

pubspec.yaml文件中添加如下代码:

dependencies:
  fluwx: ^0.1.2

初始化

使用Fluwx前,需要进行初始化操作:

Fluwx.registerApp(RegisterModel(appId: "your app id", doOnAndroid: true, doOnIOS: true));
  • appId:在微信平台申请的appId。
  • doOnAndroid:是否在android平台上执行此操作。
  • doOnIOS:是否在平台上执行此操作。
    每一个字段都是非必须的,但是如果不传appIddoOnAndroid: false或者doOnIOS: false,请务必手动注册WXApi以保证Fluwx正常工作。 注册完成后,请在使用Fluwx前在对应平台添加如下代码: Android上:
FluwxShareHandler.setWXApi(wxapi)

iOS上:

isWeChatRegistered = YES;

注意:尽管可以通过Fluwx完成微信注册,但一些操作依然需要在对应平台进行设置,如配置iOS的URLSchema,Android上的WXEntryActivity等。

传送门

更多功能敬请请期待

LICENSE

Copyright 2018 OpenFlutter Project

Licensed to the Apache Software Foundation (ASF) under one or more contributor
license agreements.  See the NOTICE file distributed with this work for
additional information regarding copyright ownership.  The ASF licenses this
file to you under the Apache License, Version 2.0 (the "License"); you may not
use this file except in compliance with the License.  You may obtain a copy of
the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.  See the
License for the specific language governing permissions and limitations under
the License.

About

Flutter版微信SDK.WeChat SDK for flutter.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Dart 64.5%
  • Java 20.9%
  • Kotlin 13.0%
  • Ruby 1.6%