import 'dart:async'; import 'dart:core'; import 'package:flutter/cupertino.dart'; import 'package:flutter/services.dart'; import 'package:gengmei_flutter_plugin/ScanImagePlugn.dart'; import 'package:gengmei_flutter_plugin/SharedPlugin.dart'; class GengmeiFlutterPlugin { static const MethodChannel _channel = const MethodChannel('gengmei_flutter_plugin'); static const EventChannel _eventChannel = const EventChannel('gengmei_flutter_plugin_event'); static get phoneImagesEvent => _eventChannel; static Future>> phoneImages() async { return await ScanImagePlugn.scanImages(_channel); } static Future nativeCamera(String authority) async { return await ScanImagePlugn.nativeCamera(_channel, authority); } static Future quitPage() async { return await ScanImagePlugn.quitPage(_channel); } static Future getInt(String key, int value) async { return await SharedPlugin.getInt(key, value, _channel); } static Future getDouble(String key, double value) async { return await SharedPlugin.getDouble(key, value, _channel); } static Future getString(String key, String value) async { return await SharedPlugin.getString(key, value, _channel); } static Future getbool(String key, bool value) async { return await SharedPlugin.getBoolean(key, value, _channel); } static Future> getStringList( String key, List value) async { return await SharedPlugin.getStringList(key, value, _channel); } static Future saveString(String key, String value) async { return await SharedPlugin.saveString(key, value, _channel); } static Future saveInt(String key, int value) async { return await SharedPlugin.saveInt(key, value, _channel); } static Future saveDouble(String key, double value) async { return await SharedPlugin.saveDouble(key, value, _channel); } static Future saveBool(String key, bool value) async { return await SharedPlugin.saveBoolean(key, value, _channel); } static Future saveStringList(String key, List value) async { return await SharedPlugin.saveStringList(key, value, _channel); } static Future clearShare() async { return await SharedPlugin.clear(_channel); } }