TypeMatePlatform class abstract

The interface that implementations of TypeMate must implement.

This abstract class defines the contract that platform-specific implementations must follow. It provides the foundation for communication between Dart and native platform code.

Platform Implementation

Platform implementations should extend this class rather than implement it directly. This ensures proper token validation and interface compliance.

Currently supported platforms:

Architecture

The platform interface uses the plugin_platform_interface pattern:

  1. Define abstract methods in this interface
  2. Implement concrete methods in platform-specific classes
  3. Register implementations with the plugin system

Example of extending this interface:

class CustomTypeMateImplementation extends TypeMatePlatform {
  @override
  Future<bool> checkOverlayPermission() {
    // Custom implementation
  }
  // ... other methods
}

See also:

Inheritance
  • Object
  • PlatformInterface
  • TypeMatePlatform
Implementers

Constructors

TypeMatePlatform()
Constructs a TypeMatePlatform.

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

checkAccessibilityService() Future<bool>
Checks if the accessibility service is enabled.
checkOverlayPermission() Future<bool>
Checks if overlay permission is granted.
isOverlayVisible() Future<bool>
Checks if the overlay is currently visible.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
openAccessibilitySettings() Future<void>
Opens the accessibility settings for the user to enable the service.
removeTextFieldFocusListener() → void
Removes the text field focus listener.
requestOverlayPermission() Future<void>
Requests system overlay permission.
setTextFieldFocusListener(dynamic onTextFieldFocused(), dynamic onTextFieldUnfocused()) → void
Sets a callback to receive text field focus events. The callback receives notifications when text fields are focused/unfocused.
startOverlayService() Future<void>
Starts the overlay service that tracks text input and shows bubbles.
stopOverlayService() Future<void>
Stops the overlay service.
testOverlay() Future<void>
Tests the overlay by showing a bubble for a few seconds.
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited

Static Properties

instance TypeMatePlatform
The default instance of TypeMatePlatform to use.
getter/setter pair