keyboard_android_platform_interface.dart 2.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798
  1. import 'package:plugin_platform_interface/plugin_platform_interface.dart';
  2. import 'keyboard_android_method_channel.dart';
  3. abstract class KeyboardAndroidPlatform extends PlatformInterface {
  4. /// Constructs a KeyboardAndroidPlatform.
  5. KeyboardAndroidPlatform() : super(token: _token);
  6. static final Object _token = Object();
  7. static KeyboardAndroidPlatform _instance = MethodChannelKeyboardAndroid();
  8. /// The default instance of [KeyboardAndroidPlatform] to use.
  9. ///
  10. /// Defaults to [MethodChannelKeyboardAndroid].
  11. static KeyboardAndroidPlatform get instance => _instance;
  12. /// Platform-specific implementations should set this with their own
  13. /// platform-specific class that extends [KeyboardAndroidPlatform] when
  14. /// they register themselves.
  15. static set instance(KeyboardAndroidPlatform instance) {
  16. PlatformInterface.verifyToken(instance, _token);
  17. _instance = instance;
  18. }
  19. Future<String?> getPlatformVersion() {
  20. throw UnimplementedError('platformVersion() has not been implemented.');
  21. }
  22. Future<void> initPlugin() {
  23. throw UnimplementedError(
  24. 'initPlugin() has not been implemented.',
  25. );
  26. }
  27. Future<void> enableFloatingWindow(bool enable) {
  28. throw UnimplementedError(
  29. 'enableFloatingWindow(bool enable) has not been implemented.',
  30. );
  31. }
  32. void jumpFloatingWindowSetting() {
  33. throw UnimplementedError(
  34. 'jumpFloatingWindowSetting() has not been implemented.',
  35. );
  36. }
  37. Future<bool> hasFloatingWindowPermission() {
  38. throw UnimplementedError(
  39. 'hasFloatingWindowPermission() has not been implemented.',
  40. );
  41. }
  42. Future<void> openInputMethodSettings() {
  43. throw UnimplementedError(
  44. 'openInputMethodSettings() has not been implemented.',
  45. );
  46. }
  47. Future<bool> isTargetKeyboardEnabled() {
  48. throw UnimplementedError(
  49. 'isTargetKeyboardEnabled() has not been implemented.',
  50. );
  51. }
  52. Future<bool> isDefaultKeyboard() {
  53. throw UnimplementedError(
  54. 'isDefaultKeyboard() has not been implemented.',
  55. );
  56. }
  57. void updateKeyboardInfo(String keyboardInfoJson) {
  58. throw UnimplementedError(
  59. 'updateKeyboardInfo(String keyboardInfoJson) has not been implemented.',
  60. );
  61. }
  62. void refreshCharacterList() {
  63. throw UnimplementedError(
  64. 'refreshCharacterList() has not been implemented.',
  65. );
  66. }
  67. // /// 获取键映射(需要在 `MethodChannelKeyboardAndroid` 实现)
  68. // Future<List<Map<String, String>>> getKeyMappings() {
  69. // throw UnimplementedError('getKeyMappings() has not been implemented.');
  70. // }
  71. //
  72. // /// 设置键映射(需要在 `MethodChannelKeyboardAndroid` 实现)
  73. // Future<bool> setKeyMappings(List<Map<String, String>> mappings) {
  74. // throw UnimplementedError('setKeyMappings() has not been implemented.');
  75. // }
  76. //
  77. // /// 通过方法名获取动态文本
  78. // Future<String?> getDynamicText(String method) {
  79. // throw UnimplementedError('getDynamicText() has not been implemented.');
  80. // }
  81. }