我有一个DefaultTabController,其中我使用了带有TabBarView的列,但是我需要对其进行滚动...。
我尝试使用Listview,但是它不起作用...这是与列配合使用的代码,但是它无法滚动并且文本不适合页面。.所以我需要滚动
return Scaffold(
backgroundColor: Colors.white,
appBar: AppBar(
title: Text('Invitatorio '+lesson.nombre), backgroundColor: Colors.brown[300]),
body: DefaultTabController(
length: invitatoriosPrueba.length,
child: Column(
children: <Widget>[
Container(
child: TabPageSelector(selectedColor: Colors.brown[300]),
padding: EdgeInsets.all(10),
),
Container(
margin: EdgeInsets.only(left: 40, right: 40),
child: Divider(color: Colors.brown)),
Container(
padding: const EdgeInsets.only(
top: 20.0, bottom: 10.0, left: 30.0, right: 30.0),
child: Text(
'Invitatorio',
textAlign: TextAlign.center,
style: TextStyle(
color: Colors.redAccent,
fontWeight: FontWeight.bold),
)),
Container(
padding: const EdgeInsets.only(
left: 15, right: 15, bottom: 15, top: 0),
child: Text.rich(TextSpan(children: <TextSpan>[
TextSpan(
text: 'Ant. ',
style: TextStyle(
color: Colors.red, fontWeight: FontWeight.bold)),
TextSpan(
text: lesson.invitatorioAnt,
style: TextStyle(
color: Colors.black,
),
),
])),
),
Container(
child: Expanded(
child: TabBarView(children: invitatoriosPrueba),
),
)
],
),
),
);
} }