Commit 83a1614b authored by Lila NICKLER's avatar Lila NICKLER

Ajout d'un onglet de navigation + update graphique

parent 9ef07c3f
//import 'dart:html';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
...@@ -25,10 +24,7 @@ class MyApp extends StatelessWidget { ...@@ -25,10 +24,7 @@ class MyApp extends StatelessWidget {
class MyHomePage extends StatefulWidget { class MyHomePage extends StatefulWidget {
MyHomePage({Key key, this.title}) : super(key: key); MyHomePage({Key key, this.title}) : super(key: key);
final String title; final String title;
@override @override
_MyHomePageState createState() => _MyHomePageState(); _MyHomePageState createState() => _MyHomePageState();
} }
...@@ -39,7 +35,7 @@ class _MyHomePageState extends State<MyHomePage> { ...@@ -39,7 +35,7 @@ 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', 'Home',
style: optionStyle, style: optionStyle,
), ),
Text( Text(
...@@ -50,6 +46,10 @@ class _MyHomePageState extends State<MyHomePage> { ...@@ -50,6 +46,10 @@ class _MyHomePageState extends State<MyHomePage> {
'Mes Jeux Vidéo', 'Mes Jeux Vidéo',
style: optionStyle, style: optionStyle,
), ),
Text(
'Informations',
style: optionStyle,
),
]; ];
void _onItemTapped(int index) { void _onItemTapped(int index) {
...@@ -71,18 +71,29 @@ class _MyHomePageState extends State<MyHomePage> { ...@@ -71,18 +71,29 @@ class _MyHomePageState extends State<MyHomePage> {
BottomNavigationBarItem( BottomNavigationBarItem(
icon: Icon(Icons.home), icon: Icon(Icons.home),
label: 'Home', label: 'Home',
backgroundColor: Colors.blue
), ),
BottomNavigationBarItem( BottomNavigationBarItem(
icon: Icon(Icons.ondemand_video_rounded ), icon: Icon(Icons.ondemand_video_rounded ),
label: 'Séries & Films', label: 'Séries & Films',
backgroundColor: Colors.blue
), ),
BottomNavigationBarItem( BottomNavigationBarItem(
icon: Icon(Icons.videogame_asset_outlined), icon: Icon(Icons.videogame_asset_outlined),
label: 'Jeux Vidéo', label: 'Jeux Vidéo',
backgroundColor: Colors.blue
),
BottomNavigationBarItem(
icon: Icon(Icons.info_outline_rounded ),
label: 'Informtations',
backgroundColor: Colors.blue
), ),
], ],
currentIndex: _selectedIndex, currentIndex: _selectedIndex,
selectedItemColor: Colors.amber[800], selectedItemColor: Colors.white,
onTap: _onItemTapped,), onTap: _onItemTapped,),
floatingActionButton: FloatingActionButton( floatingActionButton: FloatingActionButton(
child: Icon(Icons.add), child: Icon(Icons.add),
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment