import 'package:plugin_platform_interface/plugin_platform_interface.dart'; import 'keyboard_android_method_channel.dart'; abstract class KeyboardAndroidPlatform extends PlatformInterface { /// Constructs a KeyboardAndroidPlatform. KeyboardAndroidPlatform() : super(token: _token); static final Object _token = Object(); static KeyboardAndroidPlatform _instance = MethodChannelKeyboardAndroid(); /// The default instance of [KeyboardAndroidPlatform] to use. /// /// Defaults to [MethodChannelKeyboardAndroid]. static KeyboardAndroidPlatform get instance => _instance; /// Platform-specific implementations should set this with their own /// platform-specific class that extends [KeyboardAndroidPlatform] when /// they register themselves. static set instance(KeyboardAndroidPlatform instance) { PlatformInterface.verifyToken(instance, _token); _instance = instance; } Future getPlatformVersion() { throw UnimplementedError('platformVersion() has not been implemented.'); } Future initPlugin() { throw UnimplementedError( 'initPlugin() has not been implemented.', ); } Future enableFloatingWindow(bool enable) { throw UnimplementedError( 'enableFloatingWindow(bool enable) has not been implemented.', ); } void jumpFloatingWindowSetting() { throw UnimplementedError( 'jumpFloatingWindowSetting() has not been implemented.', ); } Future hasFloatingWindowPermission() { throw UnimplementedError( 'hasFloatingWindowPermission() has not been implemented.', ); } Future openInputMethodSettings() { throw UnimplementedError( 'openInputMethodSettings() has not been implemented.', ); } Future isTargetKeyboardEnabled() { throw UnimplementedError( 'isTargetKeyboardEnabled() has not been implemented.', ); } Future isDefaultKeyboard() { throw UnimplementedError( 'isDefaultKeyboard() has not been implemented.', ); } void updateKeyboardInfo(String keyboardInfoJson) { throw UnimplementedError( 'updateKeyboardInfo(String keyboardInfoJson) has not been implemented.', ); } void refreshCharacterList() { throw UnimplementedError( 'refreshCharacterList() has not been implemented.', ); } // /// 获取键映射(需要在 `MethodChannelKeyboardAndroid` 实现) // Future>> getKeyMappings() { // throw UnimplementedError('getKeyMappings() has not been implemented.'); // } // // /// 设置键映射(需要在 `MethodChannelKeyboardAndroid` 实现) // Future setKeyMappings(List> mappings) { // throw UnimplementedError('setKeyMappings() has not been implemented.'); // } // // /// 通过方法名获取动态文本 // Future getDynamicText(String method) { // throw UnimplementedError('getDynamicText() has not been implemented.'); // } }