We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Widget build(BuildContext context) { return SmartRefresher( enablePullDown: true, enablePullUp: true, controller: _refreshController, onRefresh: () { _feedController.refreshHotFeedList(_refreshController); }, onLoading: () { _feedController.getHotFeedList(_refreshController); },
child: _getInvitationList(context));
}
_getInvitationList(BuildContext context) { return Obx(() { List invitationList = _feedController.hotFeedList; if (invitationList.isEmpty) { return Container( color: ColorRes.color_14, height: MediaQuery.of(context).size.height, ); } else { return ListView.separated( separatorBuilder: (context, index) => const Divider( // height: 10, thickness: 5, color: ColorRes.color_14, ), controller: _pageController, itemCount: invitationList.length, itemBuilder: (context, index) { return Container( height: 80, child: Text("$index"), );
为什么当数据不满一屏的时候可以下拉和上拉,满了就不能下拉和上拉刷新了啊
The text was updated successfully, but these errors were encountered:
Hello @xaiocaiji7653 maybe you can try this bro, hope this can help
class Example extends StatefulWidget { const Example({super.key}); @override State<Example> createState() => _ExampleState(); } class _ExampleState extends State<Example> { final RefreshController _refreshController = RefreshController(); Future<void> testRefresh() async { _refreshController.requestRefresh(); await Future.delayed(Durations.extralong4); _refreshController.refreshCompleted(); } Future<void> testLoadMore() async { _refreshController.requestLoading(); await Future.delayed(Durations.extralong4); _refreshController.loadComplete(); } @override Widget build(BuildContext context) { return Scaffold( appBar: AppBar( title: const Text('Data Not Exceed Screen'), ), body: SmartRefresher( onRefresh: () async { testRefresh(); }, onLoading: () { testLoadMore(); }, controller: _refreshController, enablePullDown: true, enablePullUp: true, header: const ClassicHeader(), child: ListView.builder( itemCount: 1, itemBuilder: (_, __) => const Text('Only this Data'), ), ), ); } }
Sorry, something went wrong.
No branches or pull requests
Widget build(BuildContext context) {
return SmartRefresher(
enablePullDown: true,
enablePullUp: true,
controller: _refreshController,
onRefresh: () {
_feedController.refreshHotFeedList(_refreshController);
},
onLoading: () {
_feedController.getHotFeedList(_refreshController);
},
}
_getInvitationList(BuildContext context) {
return Obx(() {
List invitationList = _feedController.hotFeedList;
if (invitationList.isEmpty) {
return Container(
color: ColorRes.color_14,
height: MediaQuery.of(context).size.height,
);
} else {
return ListView.separated(
separatorBuilder: (context, index) => const Divider(
// height: 10,
thickness: 5,
color: ColorRes.color_14,
),
controller: _pageController,
itemCount: invitationList.length,
itemBuilder: (context, index) {
return Container(
height: 80,
child: Text("$index"),
);
为什么当数据不满一屏的时候可以下拉和上拉,满了就不能下拉和上拉刷新了啊
The text was updated successfully, but these errors were encountered: