- Avoid queuing too much checks (Fixes #3).
- Improve the way to get the bottom inset.
- Update the size when the keyboard type is changed (Fixes #2).
- Improve the way to get the bottom inset.
- Remove the screenshot to decrease the size of the package.
- Update README.
- Update sdk version to
>=3.0.0 <4.0.0
. - Remove all deprecated methods and variables.
- Change the variable name from
isIncludeStartChanging
toincludeTransitionalState
.
- Update comments.
- Update homepage URL.
- Release to stable.
- Add
visibling
andhiding
toKeyboardState
. - Add
stateAsBool()
to get the current keyboard state asbool
- Change the parameter of
onChanged
frombool
toKeyboardState
. - Deprecated:
- Change sdk version to ">=2.18.0 <4.0.0".
asStream
=>stream
oraddCallback
currentState
=>state
asKeyboardState
keyboardSize
=>size
isKeyboardSizeLoaded
=>isSizeLoaded
ensureKeyboardSizeLoaded
=>ensureSizeLoaded
minDifferentSize
no need to usekeyboardState
no need to use
- Add method
addCallback
to add a callback to receive keyboard state changed events.
- Change from
stateAsBool
tostateAsBool([bool isIncludeStartChanging = false])
. - Update screenshot.
- Update README.
- Improve screenshot.
ensureSizeLoaded
is now returnFuture<void>
.- Update README.
- 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
onChanged
frombool
toKeyboardState
- Update
onChanged
return 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).
- Fixes the issue related to
Future already completed
.
- Add
ensureKeyboardSizeLoaded
toKeyboardDetectionController
to wait for the keyboard size asynchronous. - Increase min sdk version to
2.17.0
. - Remove useless code.
- Update dependencies.
- Update README.
- Change LICENSE to MIT.
- Changed
minDifferentSize
default value back to 0 to avoid laggy issue.
- Fixed issue when using
pushAndRemoveUntil
to navigate to another page.
- [BREAKING CHANGE]: Removed
timerDuration
inKeyboardDetectionController
. - The
minDifferentSize
now works correctly and responses right after the bottom view insets satified the condition. Default value now is set to 100. - Added
keyboardSize
andisKeyboardSizeLoaded
toKeyboardDetectionController
to get the keyboard size.
- Compatible with Flutter 3.0.
- Changed from using
Timer
todidChangeMetrics
for listening to the changing of the bottom view insets. - Added
minDifferentSize
parameter 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
timerDuration
inKeyboardDetectionController
since this version.
- Auto close usused resources after dispose.
- Added 3 variables to
KeyboardDetectionController
to 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).asStream
to listen for keyboard visibility changing events inbool
.
-
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:
- Initial release.