73 lines
1.9 KiB
Dart
73 lines
1.9 KiB
Dart
import 'package:flutter/material.dart';
|
|
import 'package:openclosenew/11_busiesshome.dart';
|
|
|
|
import 'businessempty.dart';
|
|
import 'colors.dart';
|
|
import 'fontsize.dart';
|
|
|
|
class bottomnavigation extends StatefulWidget {
|
|
const bottomnavigation({Key? key}) : super(key: key);
|
|
|
|
@override
|
|
State<bottomnavigation> createState() => _bottomnavigationState();
|
|
}
|
|
|
|
class _bottomnavigationState extends State<bottomnavigation> {
|
|
int _selectedIndex = 0;
|
|
final screens = [
|
|
businessempty(),
|
|
Scaffold(),
|
|
Scaffold(),
|
|
Scaffold(),
|
|
Scaffold(),
|
|
];
|
|
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
return Scaffold(
|
|
body: screens[_selectedIndex],
|
|
bottomNavigationBar: BottomNavigationBar(
|
|
iconSize: 20,
|
|
unselectedFontSize: SubText,
|
|
selectedFontSize: SubText,
|
|
type: BottomNavigationBarType.fixed,
|
|
items: const [
|
|
BottomNavigationBarItem(
|
|
icon: ImageIcon(
|
|
AssetImage('assets/images/store.png'),
|
|
),
|
|
label: 'Business',
|
|
),
|
|
BottomNavigationBarItem(
|
|
icon: ImageIcon(
|
|
AssetImage('assets/images/messages.png'),
|
|
),
|
|
label: 'Chat',
|
|
),
|
|
BottomNavigationBarItem(
|
|
icon: ImageIcon(
|
|
AssetImage('assets/images/discount.png'),
|
|
),
|
|
label: 'Offer',
|
|
),
|
|
BottomNavigationBarItem(
|
|
icon: ImageIcon(
|
|
AssetImage('assets/images/profile.png'),
|
|
),
|
|
label: 'Profile',
|
|
),
|
|
BottomNavigationBarItem(
|
|
icon: ImageIcon(
|
|
AssetImage('assets/images/setting.png'),
|
|
),
|
|
label: 'Settings',
|
|
),
|
|
],
|
|
currentIndex: _selectedIndex,
|
|
selectedItemColor: primaryColor,
|
|
onTap: (screens) => setState(() => this._selectedIndex = screens),
|
|
),
|
|
);
|
|
}
|
|
}
|