【发布时间】:2018-10-31 01:53:45
【问题描述】:
我已经用颤振实现了下面的底部导航栏
import 'package:flutter/material.dart';
class Test extends StatelessWidget {
@override
Widget build(BuildContext context) {
// TODO: implement build
return new Scaffold(
bottomNavigationBar: new BottomNavigationBar(
items: [
new BottomNavigationBarItem(
icon: new Icon(Icons.add),
title: new Text("trends")
),
new BottomNavigationBarItem(
icon: new Icon(Icons.location_on),
title: new Text("feed")
),
new BottomNavigationBarItem(
icon: new Icon(Icons.people),
title: new Text("community")
)
]
)
);}}
我该如何制作,onTap 在每个 BottomNavigationBar 项目上打开新的 .dart 类?
我已经尝试使用TabBarView 作为标签,但不知道如何处理底部导航栏。
【问题讨论】: