Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
A
Amse_Mediatheque_Flutter
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Lila NICKLER
Amse_Mediatheque_Flutter
Commits
83a1614b
Commit
83a1614b
authored
Feb 01, 2021
by
Lila NICKLER
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Ajout d'un onglet de navigation + update graphique
parent
9ef07c3f
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
6 deletions
+17
-6
main.dart
lib/main.dart
+17
-6
No files found.
lib/main.dart
View file @
83a1614b
//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
),
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment