Saturday, November 21, 2026
HomeiOS Developmentios - Use keyboard arrows to maneuver to subsequent textformfield

ios – Use keyboard arrows to maneuver to subsequent textformfield

[ad_1]

I’ve created a contact type with a couple of textformfields. Once I’m utilizing the keyboard I wish to additionally use the the arrows on the prime of the keyboard to maneuver to subsequent textformfield. I’ve already applied TextInputAction.subsequent in order that when clicking on “return” you go to subsequent textformfield, however I additionally wish to embrace the arrows to do the identical to go up/down.

The picture under reveals the arrows I wish to embrace motion on.

Current keyboard status

That is my present textformfield code:

Widget _createTextField(controller, keyboardType, int maxLength, int maxLines, String hintText, double screenWidth) {
    return Expanded(
      youngster: TextFormField(
        scrollPadding: EdgeInsets.solely(backside: MediaQuery.of(context).viewInsets.backside),
        textCapitalization: TextCapitalization.sentences,
        textInputAction: TextInputAction.subsequent,
        type: TextStyle(fontSize: (screenWidth > maxMobileScreenWidth) ? 16 : 12),
        controller: controller,
        keyboardType: keyboardType,
        maxLength: maxLength,
        maxLines: maxLines,
        validator: (worth) {
          if (worth!.isEmpty) {
            return '* Required discipline';
          }
          return null;
        },
        ornament: InputDecoration(
          counterText: "",
          stuffed: true,
          hintText: hintText,
          hintStyle: const TextStyle(colour: Colours.black45),
          border: OutlineInputBorder(borderRadius: BorderRadius.round(10.0)),
          fillColor: const Colour(0xff9ccb40),
        ),
      ),
    );
  }

[ad_2]

RELATED ARTICLES

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Most Popular

Recent Comments