【发布时间】:2021-01-31 09:09:06
【问题描述】:
请问当我向下滚动列表视图时如何强制屏幕顶部不消失? 正如你在这张照片中看到的那样
当我向下滚动 ListView 时,包含播放器小部件的顶部将消失
那么当我向下滚动 Listview 时,我该如何强制 Top Widgets 继续显示
Scaffold(
body: Container(
child: ListView(
shrinkWrap: true,
children: <Widget>[
Center(
child: Container(
width: 200.0,
height: 150.0,
child: Stack(
children: <Widget>[
Container(
decoration: BoxDecoration(
color:Color(0xff193451).withOpacity(.5),
shape: BoxShape.circle),
child: Padding(
padding: const EdgeInsets.all(.0),
child: _buildRadialSeekBar(),
),
),
Center(
child: Container(
width: 150.0,
height: 150.0,
child: Padding(
padding: const EdgeInsets.all(5.0),
child: ClipOval(
clipper: MClipper(),
child: Image.asset(
"assets/justine.jpg",
fit: BoxFit.cover,
),
),
),
),
)
],
),
),
),
Container(
// color: Colors.blue,
width: 350.0,
height: 100.0,
child: Stack(
children: <Widget>[
Center(
child: Container(
height: 65.0,
width: 290.0,
decoration: BoxDecoration(
border: Border.all(
color: Color(0xff193451), width: 3.0),
borderRadius: BorderRadius.circular(40.0)),
child: Padding(
padding: const EdgeInsets.symmetric(horizontal: 25.0),
child: Row(
children: <Widget>[
Icon(Icons.fast_rewind,
size: 55.0, color: Color(0xff193451)),
Expanded(
child: Container(),
),
Icon(Icons.fast_forward,
size: 55.0, color: Color(0xff193451))
],
),
),
),
),
Align(
alignment: Alignment.center,
child: Container(
width: 92.0,
height: 92.0,
decoration: BoxDecoration(
color: Color(0xff193451), shape: BoxShape.circle),
child: IconButton(
icon: Icon(
Icons.play_arrow,
size: 45.0,
color: Colors.white,
),
onPressed: () {},
),
),
)
],
),
),
ListView(
shrinkWrap: true,
physics: ClampingScrollPhysics(),
children: [
if(LocalUrl == "http://local") Container(child: ParseLocall(),),
if(LocalUrl == "http://music") Container(child: ParseMusicc(),),
if(LocalUrl == "http://talk") Container(child: ParseTalkk(),),
if(LocalUrl == "http://sports") Container(child: ParseSportss(),),
if(LocalUrl == "http://id=r0") Container(child: ParseByLocationn(),),
if(LocalUrl == "http://lang") Container(child: ParseLanguagess(),),
if(LocalUrl == "http://podcast") Container(child: ParseProdcastss(),),
],
),
],
),
));
提前致谢
【问题讨论】: