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
自定义的Footer代码如下:
footer: BuilderFooter( triggerOffset: 70, clamping: false, position: IndicatorPosition.above, processedDuration: Duration.zero, builder: (context, state) { if (state.mode == IndicatorMode.processing) { return Padding( padding: const EdgeInsets.only( top: 12.0, bottom: 12.0, ), child: Row( mainAxisAlignment: MainAxisAlignment.center, children: [ ExtendedImage( width: 12.0, height: 12.0, clearMemoryCacheWhenDispose: true, image: AssetImage( GetExt.isDarkMode ? 'res/images/dark/icon_load_more.png' : 'res/images/icon_load_more.png', package: 'flutter_template_sdk', ), ), Container( margin: const EdgeInsets.only(left: 8.0), child: Text( '正在加载', style: TextStyle( fontSize: 13.0, color: Theme.of(context) .extension<FlutterTemplateSdkColors>()! .clTextLevel3, ), ), ), ], ), ); } if (state.result == IndicatorResult.noMore) { return Text('没有更多数据了'); } return SizedBox.shrink(); }, ),
当列表没有更多内容时,显示了noMore的Footer,但是列表再向上滑时,Footer不动了,盖在了列表上 是哪里出问题了嘛?
The text was updated successfully, but these errors were encountered:
我也遇见同样的问题 tabview和这个下拉刷新组件 一起用的时候必定出现
Sorry, something went wrong.
翻阅源码,发现作者的自定义footer高度需要动态计算。 简单实现如下 class CustomFooter extends Footer { CustomFooter({ super.triggerOffset=35, super.clamping=false, super.position= IndicatorPosition.behind});
@OverRide Widget build(BuildContext context, IndicatorState state) { double offset = state.offset; if (state.indicator.infiniteOffset != null && state.indicator.position == IndicatorPosition.locator && (state.mode != IndicatorMode.inactive || state.result == IndicatorResult.noMore)) { offset = state.actualTriggerOffset; } if (IndicatorMode.processing == state.mode) { return Container(height: offset,child: Text("加载中"),); } if (IndicatorResult.noMore == state.result) { return Container(height: offset,child: Text("加载完成"),); } return Container(); } }
No branches or pull requests
自定义的Footer代码如下:
当列表没有更多内容时,显示了noMore的Footer,但是列表再向上滑时,Footer不动了,盖在了列表上
是哪里出问题了嘛?
The text was updated successfully, but these errors were encountered: