I have simple TextField below. I wanted to call my search function when I pressed the TextInputAction button of the SofInput Keyboard.
TextField(
keyboardType: TextInputType.phone,
textInputAction: TextInputAction.search,
decoration: InputDecoration(hintText: 'Enter Number'),
),
// Example only
void myCustomFunction() => SearchNumber();
when you press that button the onSumbitted
method get called so you can do this:
onSubmitted: (val) => searchNumber(),