import 'package:flutter/foundation.dart'; import 'package:flutter/services.dart'; import 'aliyun_face_plugin_platform_interface.dart'; /// An implementation of [AliyunFacePluginPlatform] that uses method channels. class MethodChannelAliyunFacePlugin extends AliyunFacePluginPlatform { /// The method channel used to interact with the native platform. @visibleForTesting final methodChannel = const MethodChannel('aliyun_face_plugin'); @override Future getPlatformVersion() async { final version = await methodChannel.invokeMethod('getPlatformVersion'); return version; } @override Future init() async { await methodChannel.invokeMethod('init'); } @override Future getMetaInfos() async { final facetMetaInfo = await methodChannel.invokeMethod('getMetaInfos'); return facetMetaInfo; } @override Future verify(String key, String value) async { Map params = {key: value}; final code = await methodChannel.invokeMethod('verify', params); return code; } }