addNewListener method
Subscribe to a keyboard visibility event
onChange
is called when a change of the visibility occurs
onShow
is called when the keyboard appears
onHide
is called when the keyboard disappears
Returns a subscribing id that can be used to unsubscribe
Implementation
int addNewListener(
{Function(bool)? onChange, Function? onShow, Function? onHide}) {
_list[_currentIndex] = KeyboardVisibilitySubscriber(
onChange: onChange, onShow: onShow, onHide: onHide);
return _currentIndex++;
}