Widget _buildRefresh(BuildContext context) { return EasyRefresh( // 下拉样式 header: TDRefreshHeader(), child: Column( children: [ Container( height: 171, alignment: Alignment.center, decoration: BoxDecoration( color: TDTheme.of(context).grayColor1, borderRadius: BorderRadius.all( Radius.circular(TDTheme.of(context).radiusLarge))), margin: const EdgeInsets.only(left: 16, right: 16), child: TDText( PlatformUtil.isWeb ? 'Web暂不支持下拉,请下载安装apk体验' : '拖拽该区域演示 顶部下拉刷新', font: TDTheme.of(context).fontBodyLarge, textColor: TDTheme.of(context).fontGyColor4, ), ), Container( height: 70, alignment: Alignment.center, decoration: BoxDecoration( color: TDTheme.of(context).grayColor1, borderRadius: BorderRadius.all( Radius.circular(TDTheme.of(context).radiusLarge))), margin: const EdgeInsets.only(top: 16, left: 16, right: 16), child: TDText( '下拉刷新次数:${count}', font: TDTheme.of(context).fontBodyLarge, textColor: TDTheme.of(context).fontGyColor4, ), ), ], ), // 下拉刷新回调 onRefresh: () async { await Future.delayed(const Duration(seconds: 2), () { setState(() { count++; }); }); }, ); }