apply method
bool
apply({
- KeyboardMode? mode,
- double? deviceHeight,
- double? deviceKeypadHeight,
- bool clearKeypad = false,
Applies what the host asked for. Returns whether anything moved.
Implementation
bool apply({
KeyboardMode? mode,
double? deviceHeight,
double? deviceKeypadHeight,
bool clearKeypad = false,
}) {
var before = state;
_mode = mode ?? _mode;
_deviceHeight = deviceHeight ?? _deviceHeight;
if (clearKeypad) {
_deviceKeypadHeight = null;
} else if (deviceKeypadHeight != null) {
_deviceKeypadHeight = deviceKeypadHeight;
}
var moved = state != before;
if (moved) {
_bump();
_announce();
}
return moved;
}