keyboard_android_platform_interface.dart 3.0 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('initPlugin() has not been implemented.');
  24. }
  25. Future<void> enableFloatingWindow(bool enable) {
  26. throw UnimplementedError(
  27. 'enableFloatingWindow(bool enable) has not been implemented.',
  28. );
  29. }
  30. void jumpFloatingWindowSetting() {
  31. throw UnimplementedError(
  32. 'jumpFloatingWindowSetting() has not been implemented.',
  33. );
  34. }
  35. Future<bool> hasFloatingWindowPermission() {
  36. throw UnimplementedError(
  37. 'hasFloatingWindowPermission() has not been implemented.',
  38. );
  39. }
  40. Future<void> openInputMethodSettings() {
  41. throw UnimplementedError(
  42. 'openInputMethodSettings() has not been implemented.',
  43. );
  44. }
  45. Future<bool> isTargetKeyboardEnabled() {
  46. throw UnimplementedError(
  47. 'isTargetKeyboardEnabled() has not been implemented.',
  48. );
  49. }
  50. Future<bool> isDefaultKeyboard() {
  51. throw UnimplementedError('isDefaultKeyboard() has not been implemented.');
  52. }
  53. void updateKeyboardInfo(String keyboardInfoJson) {
  54. throw UnimplementedError(
  55. 'updateKeyboardInfo(String keyboardInfoJson) has not been implemented.',
  56. );
  57. }
  58. void refreshCharacterList() {
  59. throw UnimplementedError(
  60. 'refreshCharacterList() has not been implemented.',
  61. );
  62. }
  63. void refreshData() {
  64. throw UnimplementedError('refreshData() has not been implemented.');
  65. }
  66. // /// 获取键映射(需要在 `MethodChannelKeyboardAndroid` 实现)
  67. // Future<List<Map<String, String>>> getKeyMappings() {
  68. // throw UnimplementedError('getKeyMappings() has not been implemented.');
  69. // }
  70. //
  71. // /// 设置键映射(需要在 `MethodChannelKeyboardAndroid` 实现)
  72. // Future<bool> setKeyMappings(List<Map<String, String>> mappings) {
  73. // throw UnimplementedError('setKeyMappings() has not been implemented.');
  74. // }
  75. //
  76. // /// 通过方法名获取动态文本
  77. // Future<String?> getDynamicText(String method) {
  78. // throw UnimplementedError('getDynamicText() has not been implemented.');
  79. // }
  80. }