我对 NestedScrollView 有一些问题。我已经使用 BottomNavigationBar 实现了 PageView,有时,当我在两个屏幕之间切换时,出现此错误:
'package:flutter/src/widgets/nested_scroll_view.dart':失败的断言:第 501 行 pos 14:'position.minScrollExtent != null && position.pixels != null':不是真的。
child: NestedScrollView(
controller: _controller,
headerSliverBuilder: (BuildContext context, bool innerBoxIsScrolled) {
return <Widget>[
SliverAppBar(
automaticallyImplyLeading: false,
pinned: true,
expandedHeight: 140.0,
floating: false,
centerTitle: true,
flexibleSpace: FlexibleSpaceBar(
centerTitle: true,
background: new Container(
child: FutureBuilder(
future: CoverImagesApi().getImageFile(1),
builder: (context, snapshot) {
if(snapshot.data != null) {
return Container(
child: Column(
children: <Widget>[
Expanded(
flex: 5,
child: Container(
alignment: Alignment.topCenter,
),
),
Expanded(
flex: 2,
child: new Container( …Run Code Online (Sandbox Code Playgroud)