import 'package:flutter/material.dart';
import 'package:fultter/flutter_jdshop/pages/tabs/Cart.dart';
import 'package:fultter/flutter_jdshop/pages/tabs/Category.dart';
import 'package:fultter/flutter_jdshop/pages/tabs/Home.dart';
import 'package:fultter/flutter_jdshop/pages/tabs/User.dart';
class Tabs extends StatefulWidget {
const Tabs({Key? key}) : super(key: key);
@override
_TabsState createState() => _TabsState();
}
class _TabsState extends State<Tabs> {
int _currentIndex = 0;
List _pageList=[
//Home
HomePage(),
CategoryPage(),
CartPage(),
UserPage(),
];
@override
Widget build(BuildContext context) {
return Scaffold(
appBar:AppBar(
title: Text("京东商城"),
),
body: this._pageList[this._currentIndex],
// 底部导航栏
bottomNavigationBar: BottomNavigationBar(
currentIndex: this._currentIndex
京东flutter——底部菜单栏1
于 2022-02-16 21:03:47 首次发布
![](https://img-home.csdnimg.cn/images/20240711042549.png)