Skip to content

[How to use] 达不到预期效果 #129

Open
@qflbai

Description

Platforms

Android, iOS

Description

我想实现如下图圆角除的效果,发现headerSliverBuilder里的内容会遮挡body里面的内容,如视频
WeChatbc35561b180b28258d3e6e228a247f6e

35_1679973844.mp4

My code

DefaultTabController( length: 2, child: Column( children: [ Expanded( child: ExtendedNestedScrollView( headerSliverBuilder: (context, _) { return [ SliverToBoxAdapter( child: SizedBox( width: double.infinity, height: 200, child: OverflowBox( maxHeight: 220, minHeight: 200, child: Container( height: 220, color: Colors.blue, ), ), ), ) ]; }, body: Column( children: [ Container( decoration: BoxDecoration( color: Colors.white, borderRadius: BorderRadius.circular(20)), child: const TabBar(tabs: [Text("data"),Text("data2")]), ), Expanded( child:TabBarView(children: [ Container( color: Colors.amberAccent, width: 300, ), Container( color: Colors.red, width: 300, )],)) ], ), )) ]), )

Try do it

No response

Metadata

Assignees

No one assigned

    Labels

    StackOverflowissue can be asked in StackOverflow

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions