xuelongqy / flutter_easy_refresh

A flutter widget that provides pull-down refresh and pull-up load.
https://xuelongqy.github.io/flutter_easy_refresh/
MIT License
3.85k stars 630 forks source link

列表中有输入框的刷新问题 #703

Closed 865102930 closed 1 year ago

865102930 commented 1 year ago

当列表中有输入框时,列表默认上下滑动,拖动输入框左右移动能触发左右界面面刷新

Widget build(BuildContext context) { return Scaffold( appBar: AppBarWidget(title: 'tab_1'.tr,automaticallyImplyLeading: false), body: Container( color: Colors.red, child: EasyRefresh(onRefresh: () {},child: ListView.builder(itemBuilder: (BuildContext context, int index) { return Container( width: 200, height: 100, child: TextField(

        ),
      );
    })),
  ),
);

}

https://user-images.githubusercontent.com/18364926/230751463-6d85d5da-295c-46ad-baef-3a276b0506ca.mp4

865102930 commented 1 year ago

解决了,只能用EasyRefresh.build方法设置physics

OneMoreJack commented 2 months ago

你好,我也遇到相同的问题了。 请问你是通过 EasyRefresh.builder 解决的?可以再具体点吗?

OneMoreJack commented 2 months ago

解决了,可以设置下 TextField 的 scrollPhysics

TextField(
        /// ...
        scrollPhysics: const ClampingScrollPhysics(),
)