Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
M
mediateque
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
Benjamin LEROUX
mediateque
Commits
505ea6f3
Commit
505ea6f3
authored
Feb 01, 2021
by
Benjamin LEROUX
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bottomBar commit
parent
397fac32
Pipeline
#1055
failed with stages
Changes
2
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
45 additions
and
5 deletions
+45
-5
DataBase.dart
lib/DataBase.dart
+24
-0
main.dart
lib/main.dart
+21
-5
No files found.
lib/DataBase.dart
0 → 100644
View file @
505ea6f3
import
'package:flutter/material.dart'
;
class
DataBase
{
static
List
<
Widget
>
_mangaTitles
=
<
Widget
>[];
static
List
<
Widget
>
_gameTitles
=
<
Widget
>[];
DataBase
(
int
x
){
const
TextStyle
optionStyle
=
TextStyle
(
fontSize:
30
,
fontWeight:
FontWeight
.
bold
);
//trier automatiquement plus tard
_mangaTitles
.
add
(
Image
.
network
(
'https://www.manga-news.com/public/images/series/arte-1-komikku.jpg'
));
_mangaTitles
.
add
(
Text
(
'Arte'
,
style:
optionStyle
,));
_mangaTitles
.
add
(
Image
.
network
(
'https://static.fnac-static.com/multimedia/Images/FR/NR/fa/d8/17/1562874/1507-1/tsp20161130112826/Berserk.jpg'
));
_mangaTitles
.
add
(
Text
(
'Berserk'
,
style:
optionStyle
,));
_mangaTitles
.
add
(
Image
.
network
(
'https://upload.wikimedia.org/wikipedia/en/6/6c/Koe_no_Katachi%2C_Volume_1.jpg'
));
_mangaTitles
.
add
(
Text
(
'Koe No Katachi'
,
style:
optionStyle
,));
_mangaTitles
.
add
(
Text
(
'Made In Abyss'
,
style:
optionStyle
,));
_mangaTitles
.
add
(
Text
(
'Monster'
,
style:
optionStyle
,));
_mangaTitles
.
add
(
Text
(
'Shingeki No Kyojin'
,
style:
optionStyle
,));
}
List
<
Widget
>
getMangaTitles
(){
return
_mangaTitles
;}
}
\ No newline at end of file
lib/main.dart
View file @
505ea6f3
import
'package:flutter/material.dart'
;
import
'package:flutter_media/DataBase.dart'
;
void
main
(
)
=>
runApp
(
MyApp
());
...
...
@@ -23,20 +24,35 @@ class MyStatefulWidget extends StatefulWidget {
_MyStatefulWidgetState
createState
()
=>
_MyStatefulWidgetState
();
}
/// This is the private State class that goes with MyStatefulWidget.
class
_MyStatefulWidgetState
extends
State
<
MyStatefulWidget
>
{
int
_selectedIndex
=
0
;
static
DataBase
mangaDB
=
new
DataBase
(
0
);
static
const
TextStyle
optionStyle
=
TextStyle
(
fontSize:
30
,
fontWeight:
FontWeight
.
bold
);
static
const
List
<
Widget
>
_widgetOptions
=
<
Widget
>[
static
final
List
<
Widget
>
_widgetOptions
=
<
Widget
>[
Text
(
'Accueil'
,
style:
optionStyle
,
),
Text
(
'Mes jeux vidéos'
,
style:
optionStyle
,
GridView
.
count
(
crossAxisSpacing:
10
,
mainAxisSpacing:
10
,
crossAxisCount:
2
,
children:
mangaDB
.
getMangaTitles
(),
//Text('IMAGE',style: optionStyle,),Text('TITRE',style: optionStyle,),Text('IMAGE',style: optionStyle,),Text('TITRE',style: optionStyle,),Text('IMAGE',style: optionStyle,),Text('TITRE',style: optionStyle,),Text('IMAGE',style: optionStyle,),Text('TITRE',style: optionStyle,),Text('IMAGE',style: optionStyle,),Text('TITRE',style: optionStyle,),Text('IMAGE',style: optionStyle,),Text('TITRE',style: optionStyle,),Text('IMAGE',style: optionStyle,),Text('TITRE',style: optionStyle,),,
),
// Text(
// 'Mes jeux vidéos',
// style: optionStyle,
// ),
Text
(
'Mes mangas'
,
style:
optionStyle
,
...
...
@@ -91,7 +107,7 @@ class _MyStatefulWidgetState extends State<MyStatefulWidget> {
),
],
currentIndex:
_selectedIndex
,
selectedItemColor:
Colors
.
amber
[
8
00
],
selectedItemColor:
Colors
.
blue
[
4
00
],
onTap:
_onItemTapped
,
),
);
...
...
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