anpassung an gemeinde trommler layout
This commit is contained in:
+14
-25
@@ -153,21 +153,17 @@ class _MyHomePageState extends State<MyHomePage> {
|
||||
TextStyle(fontSize: 30, fontWeight: FontWeight.bold);
|
||||
static const List<Widget> _widgetOptions = <Widget>[
|
||||
Text(
|
||||
'Index 0: Home',
|
||||
'Index 0: News',
|
||||
style: optionStyle,
|
||||
),
|
||||
Text(
|
||||
'Index 1: Business',
|
||||
'Index 1: Mängel',
|
||||
style: optionStyle,
|
||||
),
|
||||
Text(
|
||||
'Index 2: School',
|
||||
'Index 2: Profil',
|
||||
style: optionStyle,
|
||||
),
|
||||
Text(
|
||||
'Index 3: Settings',
|
||||
style: optionStyle,
|
||||
),
|
||||
)
|
||||
];
|
||||
|
||||
void _onItemTapped(int index) {
|
||||
@@ -180,36 +176,29 @@ class _MyHomePageState extends State<MyHomePage> {
|
||||
Widget build(BuildContext context) {
|
||||
return Scaffold(
|
||||
appBar: AppBar(
|
||||
title: const Text('BottomNavigationBar Sample'),
|
||||
title: const Text('Oggauer Gemeinde Trommler'),
|
||||
),
|
||||
body: Center(
|
||||
child: _widgetOptions.elementAt(_selectedIndex),
|
||||
),
|
||||
bottomNavigationBar: BottomNavigationBar(
|
||||
items: const <BottomNavigationBarItem>[
|
||||
items: const <BottomNavigationBarItem>
|
||||
[
|
||||
BottomNavigationBarItem(
|
||||
icon: Icon(Icons.home),
|
||||
label: 'Home',
|
||||
backgroundColor: Colors.red,
|
||||
icon: Icon(Icons.newspaper),
|
||||
label: 'News',
|
||||
),
|
||||
BottomNavigationBarItem(
|
||||
icon: Icon(Icons.business),
|
||||
label: 'Business',
|
||||
backgroundColor: Colors.green,
|
||||
icon: Icon(Icons.report),
|
||||
label: 'Mängel',
|
||||
),
|
||||
BottomNavigationBarItem(
|
||||
icon: Icon(Icons.school),
|
||||
label: 'School',
|
||||
backgroundColor: Colors.purple,
|
||||
),
|
||||
BottomNavigationBarItem(
|
||||
icon: Icon(Icons.settings),
|
||||
label: 'Settings',
|
||||
backgroundColor: Colors.pink,
|
||||
icon: Icon(Icons.person),
|
||||
label: 'Profil',
|
||||
),
|
||||
],
|
||||
currentIndex: _selectedIndex,
|
||||
selectedItemColor: Colors.amber[800],
|
||||
selectedItemColor: Colors.blue,
|
||||
onTap: _onItemTapped,
|
||||
),
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user