| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798 |
- 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<String?> getPlatformVersion() {
- throw UnimplementedError('platformVersion() has not been implemented.');
- }
- Future<void> initPlugin() {
- throw UnimplementedError(
- 'initPlugin() has not been implemented.',
- );
- }
- Future<void> enableFloatingWindow(bool enable) {
- throw UnimplementedError(
- 'enableFloatingWindow(bool enable) has not been implemented.',
- );
- }
- void jumpFloatingWindowSetting() {
- throw UnimplementedError(
- 'jumpFloatingWindowSetting() has not been implemented.',
- );
- }
- Future<bool> hasFloatingWindowPermission() {
- throw UnimplementedError(
- 'hasFloatingWindowPermission() has not been implemented.',
- );
- }
- Future<void> openInputMethodSettings() {
- throw UnimplementedError(
- 'openInputMethodSettings() has not been implemented.',
- );
- }
- Future<bool> isTargetKeyboardEnabled() {
- throw UnimplementedError(
- 'isTargetKeyboardEnabled() has not been implemented.',
- );
- }
- Future<bool> 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<List<Map<String, String>>> getKeyMappings() {
- // throw UnimplementedError('getKeyMappings() has not been implemented.');
- // }
- //
- // /// 设置键映射(需要在 `MethodChannelKeyboardAndroid` 实现)
- // Future<bool> setKeyMappings(List<Map<String, String>> mappings) {
- // throw UnimplementedError('setKeyMappings() has not been implemented.');
- // }
- //
- // /// 通过方法名获取动态文本
- // Future<String?> getDynamicText(String method) {
- // throw UnimplementedError('getDynamicText() has not been implemented.');
- // }
- }
|