任务发布tab

pull/1/head
戴余标 3 years ago
parent b774ea184f
commit c7509a789f

@ -69,14 +69,7 @@ class _TaskPageState extends State<TaskPage> with TickerProviderStateMixin {
children: [
Padding(
padding: EdgeInsets.symmetric(horizontal: 16.w),
child: Row(
children: [
...TaskMap.taskMode.values
.mapIndexed((currentValue, index) =>
_tabCard(currentValue, index))
.toList(),
],
),
child: _tabChange()
),
Padding(
padding: EdgeInsets.symmetric(vertical: 24.w, horizontal: 32.w),
@ -91,7 +84,7 @@ class _TaskPageState extends State<TaskPage> with TickerProviderStateMixin {
)),
body: SafeArea(
child: TabBarView(
//physics: NeverScrollableScrollPhysics(),
physics: NeverScrollableScrollPhysics(),
controller: _tabController,
children: [
HallView(
@ -110,6 +103,17 @@ class _TaskPageState extends State<TaskPage> with TickerProviderStateMixin {
);
}
Row _tabChange(){
return Row(
children: [
...TaskMap.taskMode.values
.mapIndexed((currentValue, index) =>
_tabCard(currentValue, index))
.toList(),
],
);
}
Widget _tabCard(String title, int index) {
var select = index == _tabController.index;
return GestureDetector(

Loading…
Cancel
Save