Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import 'package:flutter/material.dart';
- void main() => runApp(MyApp());
- class MyApp extends StatefulWidget {
- @override
- State<StatefulWidget> createState() {
- return MyAppState();
- }
- }
- class MyAppState extends State<MyApp> {
- int _selectedPage = 2;
- final _pageOptions = [
- Container(),
- Container(),
- Container(),
- Container(),
- Container(),
- ];
- @override
- Widget build(BuildContext context) {
- return MaterialApp(
- debugShowCheckedModeBanner: false,
- title: 'Sync Shop',
- theme: ThemeData(
- primarySwatch: Colors.red,
- ),
- home: Scaffold(
- body: _pageOptions[_selectedPage],
- bottomNavigationBar: BottomNavigationBar(
- type: BottomNavigationBarType.fixed,
- currentIndex: _selectedPage,
- onTap: (int index) {
- setState(() {
- _selectedPage = index;
- });
- },
- items: [
- BottomNavigationBarItem(
- icon: Icon(Icons.note),
- label: "Notification",
- ),
- BottomNavigationBarItem(
- icon: Icon(Icons.work),
- label: "Appointment",
- ),
- BottomNavigationBarItem(
- icon: Icon(Icons.waterfall_chart),
- label: "Request",
- ),
- BottomNavigationBarItem(
- icon: Icon(Icons.account_circle),
- label: "Profile",
- ),
- ],
- ),
- ),
- );
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement