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