TranslationBindings constructor
TranslationBindings({
- AppleTranslationHostApi? host,
- AppleTranslationPlatformApi? platform,
- bool registerCallbacks = true,
Creates bindings, defaulting to the real platform channels.
Pass registerCallbacks: false in tests that drive callbackHandler
directly.
Implementation
TranslationBindings({
AppleTranslationHostApi? host,
AppleTranslationPlatformApi? platform,
bool registerCallbacks = true,
}) : host = host ?? AppleTranslationHostApi(),
platform = platform ?? AppleTranslationPlatformApi() {
if (registerCallbacks) {
AppleTranslationCallbackApi.setUp(callbackHandler);
}
}