cancelButtonAlwaysVisible property
With showsCancelButton set to true, keeps the cancel button in place
whether or not the field has focus — for a search bar that is a mode (the
field appears when search is switched on and onCancel is the way out),
so the way out never disappears with the keyboard.
Has no effect unless showsCancelButton is also true.
Defaults to false: the iOS behaviour, cancel with focus only.
Implementation
final bool cancelButtonAlwaysVisible;