Update README.md

master
Wannz 2021-10-29 15:27:49 +08:00 committed by GitHub
parent 8cfb4ff50e
commit 74304c0abf
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 66 additions and 31 deletions

View File

@ -1,18 +1,40 @@
# Flutter <p align="center">
<a href="https://www.finclip.com?from=github">
<img width="auto" src="https://www.finclip.com/mop/document/images/logo.png">
</a>
</p>
Flutter <p align="center">
<strong>FinClip Flutter SDK</strong></br>
<p>
<p align="center">
Flutter
<p>
## <p align="center">
👉 <a href="https://www.finclip.com?from=github">https://www.finclip.com/</a> 👈
</p>
pubspec.yaml -----
## 🤔 FinClip ?
``` **** APP
**** APP SDK
FinClip
## Flutter
`pubspec.yaml`
```yaml
mop: latest.version mop: latest.version
``` ```
## ## 🖥
``` ```flutter
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'dart:async'; import 'dart:async';
import 'dart:io'; import 'dart:io';
@ -34,7 +56,7 @@ class _MyAppState extends State<MyApp> {
// Platform messages are asynchronous, so we initialize in an async method. // Platform messages are asynchronous, so we initialize in an async method.
Future<void> init() async { Future<void> init() async {
if (Platform.isIOS) { if (Platform.isiOS) {
//com.finogeeks.mopExample //com.finogeeks.mopExample
final res = await Mop.instance.initialize( final res = await Mop.instance.initialize(
'22LyZEib0gLTQdU3MUauARlLry7JL/2fRpscC9kpGZQA', '1c11d7252c53e0b6', '22LyZEib0gLTQdU3MUauARlLry7JL/2fRpscC9kpGZQA', '1c11d7252c53e0b6',
@ -115,15 +137,13 @@ class _MyAppState extends State<MyApp> {
} }
``` ```
## ## 📋
1. ### 1.
使sdkapisdksdk 使 SDK API SDK SDK
``` ```
///
/// ///
/// initialize mop miniprogram engine. /// initialize mop miniprogram engine.
/// ///
@ -137,18 +157,16 @@ class _MyAppState extends State<MyApp> {
{String apiServer, String apiPrefix}) {String apiServer, String apiPrefix})
``` ```
使: 使
``` ```
final res = await Mop.instance.initialize( final res = await Mop.instance.initialize(
'22LyZEib0gLTQdU3MUauARlLry7JL/2fRpscC9kpGZQA', '1c11d7252c53e0b6', '22LyZEib0gLTQdU3MUauARlLry7JL/2fRpscC9kpGZQA', '1c11d7252c53e0b6',
apiServer: 'https://api.finclip.com', apiPrefix: '/api/v1/mop'); apiServer: 'https://api.finclip.com', apiPrefix: '/api/v1/mop');
``` ```
2. ### 2.
``` ```
///
/// ///
/// open the miniprogram [appId] from the mop server. /// open the miniprogram [appId] from the mop server.
/// ///
@ -161,9 +179,9 @@ final res = await Mop.instance.initialize(
{final String path, final String query, final int sequence}) {final String path, final String query, final int sequence})
``` ```
3. 使 ### 3. 使
appId,name,icon,description,version,thumbnail `appId`, `name`, `icon`, `description`, `version`, `thumbnail`
``` ```
/// ///
@ -175,7 +193,7 @@ final res = await Mop.instance.initialize(
Future<Map<String, dynamic>> currentApplet() Future<Map<String, dynamic>> currentApplet()
``` ```
4. ### 4.
``` ```
/// ///
@ -185,10 +203,9 @@ final res = await Mop.instance.initialize(
Future closeAllApplets() Future closeAllApplets()
``` ```
5. ### 5.
``` ```
/// ///
/// clear applets cache /// clear applets cache
@ -197,7 +214,7 @@ final res = await Mop.instance.initialize(
Future clearApplets() Future clearApplets()
``` ```
6. ### 6.
使 使
@ -210,7 +227,6 @@ final res = await Mop.instance.initialize(
``` ```
``` ```
abstract class AppletHandler { abstract class AppletHandler {
/// ///
@ -238,19 +254,19 @@ abstract class AppletHandler {
} }
``` ```
7. api ### 7. API
SDK APIAPIAPI SDK API API API
··· ```
/// ///
/// register extension api /// register extension api
/// api /// api
/// ///
void registerExtensionApi(String name, ExtensionApiHandler handler) void registerExtensionApi(String name, ExtensionApiHandler handler)
··· ```
iosFinChatConf.js iOS `FinChatConf.js`
``` ```
module.exports = { module.exports = {
@ -263,4 +279,23 @@ module.exports = {
} }
] ]
} }
``` ```
## 🔗
FinClip
- [FinClip ](https://www.finclip.com/#/home)
- [](https://www.finclip.com/#/market)
- [](https://www.finclip.com/mop/document/)
- [SDK ](https://www.finclip.com/mop/document/introduce/quickStart/intergration-guide.html)
- [](https://www.finclip.com/mop/document/develop/guide/structure.html)
- [iOS ](https://www.finclip.com/mop/document/runtime-sdk/ios/ios-integrate.html)
- [Android ](https://www.finclip.com/mop/document/runtime-sdk/android/android-integrate.html)
- [Flutter ](https://www.finclip.com/mop/document/runtime-sdk/flutter/flutter-integrate.html)
##
****<br>
<img width="150px" src="https://www.finclip.com/mop/document/images/ic_qr.svg">
finclip <br>
<img width="150px" src="https://finclip-homeweb-1251849568.cos.ap-guangzhou.myqcloud.com/images/ldy111.jpg">