AppleTranslationHostApi class
Registered only when the framework is available (iOS 18 / macOS 15).
Constructors
- AppleTranslationHostApi({BinaryMessenger? binaryMessenger, String messageChannelSuffix = ''})
-
Constructor for AppleTranslationHostApi. The
binaryMessengernamed argument is available for dependency injection. If it is left null, the default BinaryMessenger will be used which routes to the host platform.
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- pigeonVar_binaryMessenger → BinaryMessenger?
-
final
- pigeonVar_messageChannelSuffix → String
-
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
cancelRequest(
int requestId) → Future< void> -
Cancels the Swift task behind a
startBatchrequest. -
cancelSession(
int handle) → Future< void> -
TranslationSession.cancel(). The session cannot be used afterwards. -
createSession(
String source, String? target, StrategyMessage? strategy) → Future< SessionInfoMessage> -
TranslationSession(installedSource:target:preferredStrategy:). -
defaultStrategy(
) → Future< StrategyMessage?> -
LanguageAvailability().preferredStrategy, or null before 26.4. -
isReady(
int handle) → Future< bool> -
language(
String identifier) → Future< LanguageMessage> -
Resolves a BCP 47 identifier to a
Locale.Language. -
liveHandleCount(
) → Future< int> -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
prepareTranslation(
int handle) → Future< void> -
release(
int handle) → Future< void> -
releaseAll(
) → Future< int> -
startBatch(
int handle, int requestId, List< TranslationRequestMessage> requests) → Future<void> -
translate(batch:): responses arrive through the callback API as they finish. -
status(
String source, String? target, StrategyMessage? strategy) → Future< LanguageStatusMessage> -
statusForText(
String text, String? target, StrategyMessage? strategy) → Future< LanguageStatusMessage> -
supportedLanguages(
StrategyMessage? strategy) → Future< List< LanguageMessage> > -
toString(
) → String -
A string representation of this object.
inherited
-
translate(
int handle, TranslationRequestMessage request) → Future< TranslationResponseMessage> -
translations(
int handle, List< TranslationRequestMessage> requests) → Future<List< TranslationResponseMessage> > -
translations(from:): every response at once, in request order.
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Constants
-
pigeonChannelCodec
→ const MessageCodec<
Object?>