keyboard_detection
A Flutter plugin to easily detect keyboard visibility using the bottom view inset.
0.8.1
11K downloads/mo
#2789 most downloaded on pub.dev
lamnhan066/keyboard_detection
What this package is like to depend on
Last release 11 months ago
03 Sep 2025
Ships fairly regularly
a new release about every 3 months
Most releases are documented
notes for 22 of 25 stable releases
Nothing withdrawn
no release was ever pulled
4 years old
30 releases · first in 2022
1 release in the last 12 months
see the full history below
Release timeline
30 releases · Apr 2022 to Sep 2025Releases
latest 30-
0.8.103 Sep 2025Release notes
Open source →- Replace
addCallbackwithregisterCallback. - Add
unregisterCallbackandunregisterAllCallbacksmethods. - Improve the callback removal to avoid race conditions.
- Improve the internal calculation to improve the perfomance.
- Improve the example.
- Replace
-
0.8.003 Apr 2025Release notes
Open source →- Use
Viewinstead ofMediaQueryto retrieve the bottom view inset (Thanks to @nazarrd for the idea). - Update docs, example and README.
- Use
-
0.7.323 Aug 2024 -
0.7.225 Jul 2024Release notes
Open source →- Improve the way to get the bottom inset.
- Update the size when the keyboard type is changed (Fixes #2).
-
0.7.106 May 2024Release notes
Open source →- Improve the way to get the bottom inset.
- Remove the screenshot to decrease the size of the package.
- Update README.
-
0.7.020 Nov 2023Release notes
Open source →- Update sdk version to
>=3.0.0 <4.0.0. - Remove all deprecated methods and variables.
- Change the variable name from
isIncludeStartChangingtoincludeTransitionalState.
- Update sdk version to
-
0.6.306 Oct 2023 -
0.6.223 Jul 2023Release notes
Open source →- Release to stable.
- Add
visiblingandhidingtoKeyboardState. - Add
stateAsBool()to get the current keyboard state asbool - Change the parameter of
onChangedfrombooltoKeyboardState. - Deprecated:
- Change sdk version to ">=2.18.0 <4.0.0".
asStream=>streamoraddCallbackcurrentState=>stateasKeyboardStatekeyboardSize=>sizeisKeyboardSizeLoaded=>isSizeLoadedensureKeyboardSizeLoaded=>ensureSizeLoadedminDifferentSizeno need to usekeyboardStateno need to use
-
0.6.121 Jul 2023Nothing published for this version
-
0.6.021 Jul 2023Nothing published for this version
-
0.6.0-rc.511 Jul 2023 pre-releaseRelease notes
Open source →- Add method
addCallbackto add a callback to receive keyboard state changed events.
- Add method
-
0.6.0-rc.410 Jul 2023 pre-releaseRelease notes
Open source →- Change from
stateAsBooltostateAsBool([bool isIncludeStartChanging = false]). - Update screenshot.
- Update README.
- Change from
-
0.6.0-rc.307 Jul 2023 pre-release -
0.6.0-rc.207 Jul 2023 pre-release -
0.6.0-rc.107 Jul 2023 pre-releaseRelease notes
Open source →- Change sdk version to ">=2.18.0 <4.0.0" and flutter version ">=3.3.0".
- Add visibling and hiding to KeyboardState
- Deprecate
minDifferentSize,asStream,currentState,keyboardState,keyboardSize,isKeyboardSizeLoaded,ensureKeyboardSizeLoaded - Add
state,stateAsBool,size,isSizeLoaded,ensureSizeLoaded - Change the parameter of
onChangedfrombooltoKeyboardState
-
0.5.203 Apr 2023Release notes
Open source →- Update
onChangedreturn type tovoid. - Use static variables to store keyboard size and ensure keyboard is loaded. (Just internal changing so don't affect to the current code).
- Update
-
0.5.129 Dec 2022 -
0.5.008 Nov 2022Release notes
Open source →- Add
ensureKeyboardSizeLoadedtoKeyboardDetectionControllerto wait for the keyboard size asynchronous. - Increase min sdk version to
2.17.0. - Remove useless code.
- Add
-
0.4.220 May 2022 -
0.4.2+128 May 2022 -
0.4.2+226 Jun 2022 -
0.4.2+301 Aug 2022 -
0.4.119 May 2022 -
0.4.018 May 2022Release notes
Open source →- [BREAKING CHANGE]: Removed
timerDurationinKeyboardDetectionController. - The
minDifferentSizenow works correctly and responses right after the bottom view insets satified the condition. Default value now is set to 100. - Added
keyboardSizeandisKeyboardSizeLoadedtoKeyboardDetectionControllerto get the keyboard size.
- [BREAKING CHANGE]: Removed
-
0.3.015 May 2022Release notes
Open source →- Compatible with Flutter 3.0.
- Changed from using
TimertodidChangeMetricsfor listening to the changing of the bottom view insets. - Added
minDifferentSizeparameter toKeyboardDetectionController, now you can set the minimum changed of size between two checks to detect the keyboard visibility. Default value is 0. - [Deprecated]: Don't need to use
timerDurationinKeyboardDetectionControllersince this version.
-
0.2.106 May 2022 -
0.2.006 May 2022Release notes
Open source →- Added 3 variables to
KeyboardDetectionControllerto get the current state of the keyboard visibility:currentState: the current state of the keyboard visibility return inbool?(null: unknown,true: visible,false: hidden).keyboardState: the current state of the keyboard visibility return in enumKeyboardState(unknown: unknown,visible: visible,hidden: hidden).asStreamto listen for keyboard visibility changing events inbool.
- Added 3 variables to
-
0.1.003 May 2022Release notes
Open source →-
Bug fixed: Now keyboard visibility only notify one time when changed.
-
[BREAKING CHANGE]
- Before:
@override Widget build(BuildContext context) { return MaterialApp( home: KeyboardDetection( timerDuration: const Duration(milliseconds: 10), onChanged: (value) { print('Is Keyboard Opened: $value'); setState(() { isKeyboardOpened = value; }); }, child:- Now:
@override Widget build(BuildContext context) { return MaterialApp( home: KeyboardDetection( controller: KeyboardDetectionController( timerDuration: const Duration(milliseconds: 10), onChanged: (value) { print('Is Keyboard Opened: $value'); setState(() { isKeyboardOpened = value; }); }, ), child:
-
-
0.0.129 Apr 2022Nothing published for this version
-
0.0.1+129 Apr 2022