active_keyboard_language 0.0.1
active_keyboard_language: ^0.0.1 copied to clipboard
Detects and streams the active keyboard (IME) language on iOS and Android, with an RTL-aware Directionality helper widget.
0.0.1 #
- Initial release.
KeyboardLanguage.getCurrentLanguage()— BCP-47 tag of the active keyboard language.KeyboardLanguage.onLanguageChanged— broadcast stream of language changes.KeyboardLanguage.isRtl()— RTL-script convenience check.KeyboardAwareDirectionality— widget that flipsTextDirectionautomatically. Accepts an optionalcontrollerthat clears its text on every language change, avoiding caret-reset artifacts caused by Android restarting the input connection on an IME subtype switch.- Android (API 21+) and iOS (13+) support.
- iOS: also react to
keyboardDidShowNotification, not justcurrentInputModeDidChangeNotification, so the reported language corrects itself as soon as a field is first focused instead of sticking to an initial pre-focus guess. isRtl()recognizes Uyghur (ug) in addition to the original RTL set, and tag normalization remaps legacy Java/Android ISO-639 codes (iw/ji/in) to their modern equivalents.