skip to Main Content

after updating Flutter on 14-Dec-2024 to version 3.27.0, this happens

keyboardDismissBehavior: ScrollViewKeyboardDismissBehavior.onDrag,

this line inside SingleChildScrollView always dismiss the keyboard without scrolling the UI

I noticed this line is removed in single_child_scroll_view.dart file at line #279

notification.dragDetails != null &&

see this video. https://www.veed.io/view/968e92cd-23e1-4c68-9895-a3aed846c8e8?panel=share&sharingWidget=true
any idea what to do now?

2

Answers


  1. Chosen as BEST ANSWER

    below code can work same as scrollview's onDrag behaviours

    GestureDetector(
        onTap: () => FocusScope.of(context).unfocus(),
        onVerticalDragDown: (_) => FocusScope.of(context).unfocus(),
        child: SingleChildScrollView());
    

  2. It also happens for me. A quick fix that I found is to replace SingleChildScrollView with a ListView. Hope it helps!

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search