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
9959f8cc
Commit
9959f8cc
authored
Feb 11, 2021
by
Lila NICKLER
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Resolution des Warnings
parent
489af56a
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
13 additions
and
22 deletions
+13
-22
Media.dart
lib/Media.dart
+0
-6
Widget3000.dart
lib/Widget3000.dart
+9
-9
main.dart
lib/main.dart
+4
-7
No files found.
lib/Media.dart
View file @
9959f8cc
import
'package:flutter/cupertino.dart'
;
import
'package:flutter/material.dart'
;
import
'package:google_fonts/google_fonts.dart'
;
import
'Widget3000.dart'
;
class
MediaItem
{
String
name
;
...
...
lib/Widget3000.dart
View file @
9959f8cc
...
...
@@ -3,24 +3,24 @@ import 'package:google_fonts/google_fonts.dart';
import
'package:mediateque_tp1/Media.dart'
;
class
Affichage
_l
ist
extends
StatefulWidget
{
class
Affichage
L
ist
extends
StatefulWidget
{
final
List
<
MediaItem
>
list
;
final
List
<
MediaItem
>
list
_f
av
;
final
List
<
MediaItem
>
list
F
av
;
Affichage
_list
({
Key
key
,
@required
this
.
list
,
this
.
list_f
av
}):
super
(
key:
key
);
Affichage
List
({
Key
key
,
@required
this
.
list
,
this
.
listF
av
}):
super
(
key:
key
);
@override
_Affichage
_listState
createState
()
=>
_Affichage_l
istState
();
_Affichage
ListState
createState
()
=>
_AffichageL
istState
();
}
class
_Affichage
_listState
extends
State
<
Affichage_l
ist
>
{
_Affichage
_l
istState
():
super
();
class
_Affichage
ListState
extends
State
<
AffichageL
ist
>
{
_Affichage
L
istState
():
super
();
ListView
mediaDisplay
(
MediaItem
item
)
{
const
TextStyle
titleStyle
=
TextStyle
(
fontSize:
30
,
fontWeight:
FontWeight
.
bold
);
const
TextStyle
bodyStyle
=
TextStyle
(
fontSize:
11
);
bool
alreadySaved
=
widget
.
list
_f
av
.
contains
(
item
);
bool
alreadySaved
=
widget
.
list
F
av
.
contains
(
item
);
return
ListView
(
shrinkWrap:
true
,
...
...
@@ -36,9 +36,9 @@ class _Affichage_listState extends State<Affichage_list> {
onTap:
()
{
setState
(()
{
if
(
alreadySaved
)
{
widget
.
list
_f
av
.
remove
(
item
);
widget
.
list
F
av
.
remove
(
item
);
}
else
{
widget
.
list
_f
av
.
add
(
item
);
widget
.
list
F
av
.
add
(
item
);
}
});
},
...
...
lib/main.dart
View file @
9959f8cc
...
...
@@ -41,15 +41,13 @@ class MyHomePage extends StatefulWidget {
class
_MyHomePageState
extends
State
<
MyHomePage
>
{
int
_selectedIndex
=
0
;
static
const
TextStyle
optionStyle
=
TextStyle
(
fontSize:
30
,
fontWeight:
FontWeight
.
bold
,
color:
Colors
.
white
)
;
static
DataBase
db
=
new
DataBase
();
static
Affichage
_list
affichageSeries
=
new
Affichage_list
(
list:
db
.
getlistSeries
(),
list_f
av:
db
.
getlistSaved
());
static
Affichage
_list
affichageGames
=
new
Affichage_list
(
list:
db
.
getlistGames
(),
list_f
av:
db
.
getlistSaved
());
static
Affichage
_list
affichageFav
=
new
Affichage_list
(
list:
db
.
getlistSaved
(),
list_f
av:
db
.
getlistSaved
());
static
Affichage
_list
affichafeFilms
=
new
Affichage_list
(
list:
db
.
getlistFilms
(),
list_f
av:
db
.
getlistSaved
());
static
Affichage
List
affichageSeries
=
new
AffichageList
(
list:
db
.
getlistSeries
(),
listF
av:
db
.
getlistSaved
());
static
Affichage
List
affichageGames
=
new
AffichageList
(
list:
db
.
getlistGames
(),
listF
av:
db
.
getlistSaved
());
static
Affichage
List
affichageFav
=
new
AffichageList
(
list:
db
.
getlistSaved
(),
listF
av:
db
.
getlistSaved
());
static
Affichage
List
affichafeFilms
=
new
AffichageList
(
list:
db
.
getlistFilms
(),
listF
av:
db
.
getlistSaved
());
static
List
<
Widget
>
_widgetOptions
=
<
Widget
>[
...
...
@@ -69,7 +67,6 @@ class _MyHomePageState extends State<MyHomePage> {
@override
Widget
build
(
BuildContext
context
)
{
final
List
<
MediaItem
>
series
=
<
MediaItem
>
[];
return
Scaffold
(
appBar:
AppBar
(
...
...
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