有盾插件,非官方版。
本SDK包含两种so文件
abiFilters 'armeabi', 'armeabi-v7a'
不同的so文件会导致冲突 目前Flutter默认打包的文件 flutter build apk --release --target-platform android-arm64 flutter run --target-platform android-arm64
arm64-v8a
项目设置
abiFilters 'armeabi'
使用以下命令打包 flutter build apk --release --target-platform android-arm flutter run --target-platform android-arm
armeabi-v7a支持 https://github.com/flutter/flutter/issues/18494
compileSdkVersion 28 Flutter TextField不能编辑,降回27
1.设置Build Settings ->Enable Bitcode 为No;
2.若您的app需要支持iOS10系统,请在info.plist里添加以下字段:
如有ver_app参数获取不到的问题,请修改 Runner->target->identity->Version 为真实版本号。
This project is a starting point for a Flutter plug-in package, a specialized package that includes platform-specific implementation code for Android and/or iOS.
For help getting started with Flutter, view our online documentation, which offers tutorials, samples, guidance on mobile development, and a full API reference.
example/README.md
import 'package:flutter/material.dart';
import 'dart:async';
import 'package:udid_plugin/udid_plugin.dart';
void main() => runApp(MyApp());
class MyApp extends StatefulWidget {
@override
_MyAppState createState() => _MyAppState();
}
class _MyAppState extends State<MyApp> {
final _uuidPlugin = UdidPlugin();
StreamSubscription _subscription;
@override
void initState() {
super.initState();
_subscription = _uuidPlugin.errorStream.listen((errorResult) {
print(errorResult.retMsg);
});
}
@override
void dispose() {
_subscription.cancel();
_uuidPlugin.dispose();
super.dispose();
}
Future<Null> startLivenessFlow() async {
LivenessResult result = await _uuidPlugin.startLivenessFlow({"engineArg": ""});
print(result.toString());
}
@override
Widget build(BuildContext context) {
return MaterialApp(
home: Scaffold(
appBar: AppBar(
title: const Text('Plugin example app'),
),
body: ListView(
padding: EdgeInsets.fromLTRB(20, 40, 20, 20),
children: <Widget>[
new RaisedButton(
padding: EdgeInsets.only(top: 15, bottom: 15),
color: Colors.blue,
textColor: Colors.white,
onPressed: () {
_uuidPlugin.startOCRFlow({"": ""});
},
child: Center(
// height: 44,
child: Text("OCR"),
),
),
new Padding(
padding: EdgeInsets.only(top: 10),
),
new RaisedButton(
padding: EdgeInsets.only(top: 15, bottom: 15),
color: Colors.blue,
textColor: Colors.white,
onPressed: () {
startLivenessFlow();
},
child: Center(
// height: 44,
child: Text("活体检测"),
),
),
new Padding(
padding: EdgeInsets.only(top: 10),
),
new RaisedButton(
padding: EdgeInsets.only(top: 15, bottom: 15),
color: Colors.blue,
textColor: Colors.white,
onPressed: () {
_uuidPlugin.startIDAuthFlow({"engineArg": ""});
},
child: Center(
// height: 44,
child: Text("身份认证"),
),
),
new Padding(
padding: EdgeInsets.only(top: 10),
),
new RaisedButton(
padding: EdgeInsets.only(top: 15, bottom: 15),
color: Colors.blue,
textColor: Colors.white,
onPressed: () {
_uuidPlugin.startCompareFlow({"engineArg": ""});
},
child: Center(
// height: 44,
child: Text("人脸比对"),
),
),
new Padding(
padding: EdgeInsets.only(top: 10),
),
new RaisedButton(
padding: EdgeInsets.only(top: 15, bottom: 15),
color: Colors.blue,
textColor: Colors.white,
onPressed: () {
_uuidPlugin.startVideoFlow({"engineArg": ""});
},
child: Center(
// height: 44,
child: Text("视频存证"),
),
),
new Padding(
padding: EdgeInsets.only(top: 10),
),
new RaisedButton(
padding: EdgeInsets.only(top: 15, bottom: 15),
color: Colors.blue,
textColor: Colors.white,
onPressed: () {
_uuidPlugin.startCustomFlow({"engineArg": ""});
},
child: Center(
// height: 44,
child: Text("组合流程(身份认证+活体+比对)"),
),
),
new Padding(
padding: EdgeInsets.only(top: 10),
),
new RaisedButton(
padding: EdgeInsets.only(top: 15, bottom: 15),
color: Colors.blue,
textColor: Colors.white,
onPressed: () {},
child: Center(
// height: 44,
child: Text("拍照"),
),
),
],
),
),
);
}
}
This project is a starting point for a Flutter application.
A few resources to get you started if this is your first Flutter project:
For help getting started with Flutter, view our online documentation, which offers tutorials, samples, guidance on mobile development, and a full API reference.
Add this to your package's pubspec.yaml file:
dependencies:
udid_plugin: ^0.0.8
You can install packages from the command line:
with Flutter:
$ flutter packages get
Alternatively, your editor might support flutter packages get
.
Check the docs for your editor to learn more.
Now in your Dart code, you can use:
import 'package:udid_plugin/udid_plugin.dart';
Version | Uploaded | Documentation | Archive |
---|---|---|---|
0.0.8 | Jan 17, 2019 |
|
|
0.0.7 | Jan 17, 2019 |
|
|
0.0.6 | Jan 15, 2019 |
|
|
0.0.5 | Jan 14, 2019 |
|
|
0.0.4 | Jan 14, 2019 |
|
|
0.0.3 | Jan 12, 2019 |
|
|
0.0.2 | Jan 11, 2019 |
|
|
0.0.1 | Jan 4, 2019 |
|
|
Popularity:
Describes how popular the package is relative to other packages.
[more]
|
32
|
Health:
Code health derived from static analysis.
[more]
|
99
|
Maintenance:
Reflects how tidy and up-to-date the package is.
[more]
|
70
|
Overall:
Weighted score of the above.
[more]
|
60
|
We analyzed this package on Feb 14, 2019, and provided a score, details, and suggestions below. Analysis was completed with status completed using:
Detected platforms: Flutter
References Flutter, and has no conflicting libraries.
Document public APIs. (-0.79 points)
140 out of 141 API elements have no dartdoc comment.Providing good documentation for libraries, classes, functions, and other API elements improves code readability and helps developers find and use your API.
The package description is too short. (-20 points)
Add more detail to the description
field of pubspec.yaml
. Use 60 to 180 characters to describe the package, what it does, and its target use case.
Package is pre-v0.1 release. (-10 points)
While nothing is inherently wrong with versions of 0.0.*
, it might mean that the author is still experimenting with the general direction of the API.
Package | Constraint | Resolved | Available |
---|---|---|---|
Direct dependencies | |||
Dart SDK | >=2.0.0-dev.68.0 <3.0.0 | ||
flutter | 0.0.0 | ||
Transitive dependencies | |||
collection | 1.14.11 | ||
meta | 1.1.6 | 1.1.7 | |
sky_engine | 0.0.99 | ||
typed_data | 1.1.6 | ||
vector_math | 2.0.8 |