This commit is contained in:
2026-03-31 08:51:33 +08:00
commit e9f4844352
63 changed files with 8950 additions and 0 deletions

View File

@@ -0,0 +1,38 @@
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.');
// }
}