fluttercandies / extended_nested_scroll_view

extended nested scroll view to fix following issues. 1.pinned sliver header issue 2.inner scrollables in tabview sync issue 3.pull to refresh is not work. 4.do without ScrollController in NestedScrollView's body
MIT License
591 stars 117 forks source link

ExtendedNestedScrollView 设置 NeverScrollableScrollPhysics 属性无效 #144

Closed czeras closed 10 months ago

czeras commented 10 months ago

Platforms

dart, iOS

Description

在 ExtendedNestedScrollView 中设置 NeverScrollableScrollPhysics 属性无效,无法禁止滚动

My code

Widget _buildScaffoldBody() { final double statusBarHeight = MediaQuery.of(context).padding.top; final double pinnedHeaderHeight = //statusBar height statusBarHeight + //pinned SliverAppBar height in header kToolbarHeight; return ExtendedNestedScrollView( physics: NeverScrollableScrollPhysics(), headerSliverBuilder: (BuildContext c, bool f) { return buildSliverHeader(); }, //1.pinned sliver header issue pinnedHeaderSliverHeightBuilder: () { return pinnedHeaderHeight; }, //2.inner scrollables in tabview sync issue onlyOneScrollInBody: true, body: Column( children: [ TabBar( controller: primaryTC, labelColor: Colors.blue, indicatorColor: Colors.blue, indicatorSize: TabBarIndicatorSize.label, indicatorWeight: 2.0, isScrollable: false, unselectedLabelColor: Colors.grey, tabs: const [Tab(text: 'Tab1')], ), Expanded( child: TabBarView( physics: NeverScrollableScrollPhysics(), controller: primaryTC, children: [ // SecondaryTabView('Tab0', secondaryTC), ListView.builder( key: const PageStorageKey('Tab1'), physics: const NeverScrollableScrollPhysics(), itemCount: 50, itemBuilder: (BuildContext c, int i) { return Container( alignment: Alignment.center, height: 60.0, child: Text( const Key('Tab1').toString() + ': ListView$i', ), ); }, ), ], ), ) ], ), ); }

Try do it

截屏2023-08-25 16 16 54

zmtzawqlp commented 10 months ago

先给官方开issue

czeras commented 10 months ago

好吧,那没问题了,给产品沟通修改交互方式