39 lines
1.4 KiB
Dart
39 lines
1.4 KiB
Dart
import 'package:plugin_platform_interface/plugin_platform_interface.dart';
|
|
|
|
import 'zhiwen_method_channel.dart';
|
|
|
|
abstract class ZhiwenPlatform extends PlatformInterface {
|
|
/// Constructs a ZhiwenPlatform.
|
|
ZhiwenPlatform() : super(token: _token);
|
|
|
|
static final Object _token = Object();
|
|
|
|
static ZhiwenPlatform _instance = MethodChannelZhiwen();
|
|
|
|
/// The default instance of [ZhiwenPlatform] to use.
|
|
///
|
|
/// Defaults to [MethodChannelZhiwen].
|
|
static ZhiwenPlatform get instance => _instance;
|
|
|
|
Future<String?> getPlatformVersion();
|
|
Future<bool> openDevice(String devicePath, int baudRate);
|
|
Future<void> closeDevice();
|
|
Future<Map<String, dynamic>> enrollFingerprint(int userId);
|
|
Future<Map<String, dynamic>> verifyFingerprint(int userId);
|
|
Future<Map<String, dynamic>> deleteAllFingerprint();
|
|
Future<Map<String, dynamic>> deleteOneFingerprint(int userId);
|
|
Future<Map<String, dynamic>> identifyFingerprint();
|
|
Future<Map<String, dynamic>> getUserCount();
|
|
/// Platform-specific implementations should set this with their own
|
|
/// platform-specific class that extends [ZhiwenPlatform] when
|
|
/// they register themselves.
|
|
static set instance(ZhiwenPlatform instance) {
|
|
PlatformInterface.verifyToken(instance, _token);
|
|
_instance = instance;
|
|
}
|
|
|
|
// Future<String?> getPlatformVersion() {
|
|
// throw UnimplementedError('platformVersion() has not been implemented.');
|
|
// }
|
|
}
|