import 'package:plugin_platform_interface/plugin_platform_interface.dart'; import 'dart:async'; 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 getPlatformVersion(); Future openDevice(String devicePath, int baudRate); Future closeDevice(); Future> enrollFingerprint(int userId); Future> verifyFingerprint(int userId); Future> deleteAllFingerprint(); Future> deleteOneFingerprint(int userId); Future> identifyFingerprint(); Future> getUserCount(); /// 获取指纹录入进度事件流 /// 返回包含 step, totalSteps, progress, message 的 Map Stream> get progressStream; /// 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 getPlatformVersion() { // throw UnimplementedError('platformVersion() has not been implemented.'); // } }