Commit c7d8c515 authored by Lila NICKLER's avatar Lila NICKLER

Changement du thème visuel

parent 22926dcb
...@@ -67,7 +67,7 @@ class DataBase ...@@ -67,7 +67,7 @@ class DataBase
"assets/images/mk8.jpg"))); "assets/images/mk8.jpg")));
_listGames.add((MediaItem( _listGames.add((MediaItem(
"The Legend of Zelda: Breath of the wild", "The Legend of Zelda: Breath of the wild",
"Oubliez tout ce que vous savez sur les jeux The Legend of Zelda. Plongez dans un monde de découverte, d'exploration et d'aventure dans The Legend of Zelda: Breath of the Wild, un nouveau jeu qui vient bouleverser la série à succès. Voyagez à travers champs, traversez des forêts et grimpez sur des sommets dans votre périple où vous explorez le royaume d'Hyrule en ruines à travers cette aventure à ciel ouvert.", "Plongez dans un monde de découverte, d'exploration et d'aventure dans The Legend of Zelda: Breath of the Wild, un nouveau jeu qui vient bouleverser la série à succès.",
"assets/images/zeldaBOTW.jpg"))); "assets/images/zeldaBOTW.jpg")));
} }
......
...@@ -21,7 +21,7 @@ class _Widget3000State extends State<Widget3000> { ...@@ -21,7 +21,7 @@ class _Widget3000State extends State<Widget3000> {
_Widget3000State(): super(); _Widget3000State(): super();
ListView mediaDisplay(MediaItem item) { ListView mediaDisplay(MediaItem item) {
const TextStyle titleStyle = TextStyle(fontSize: 30, fontWeight: FontWeight.bold, color: Colors.blue); const TextStyle titleStyle = TextStyle(fontSize: 30, fontWeight: FontWeight.bold);
const TextStyle bodyStyle = TextStyle(fontSize: 11); const TextStyle bodyStyle = TextStyle(fontSize: 11);
bool alreadySaved = widget.list_fav.contains(item); bool alreadySaved = widget.list_fav.contains(item);
...@@ -31,11 +31,11 @@ class _Widget3000State extends State<Widget3000> { ...@@ -31,11 +31,11 @@ class _Widget3000State extends State<Widget3000> {
children: [ children: [
ListTile( ListTile(
title: Text( title: Text(
item.name, style: GoogleFonts.montserrat(textStyle: titleStyle), item.name, style: GoogleFonts.montserrat(textStyle: titleStyle, color: Colors.deepPurple[300]),
textAlign: TextAlign.center,), textAlign: TextAlign.center,),
trailing: Icon( trailing: Icon(
alreadySaved ? Icons.star_outlined : Icons.star_outlined, alreadySaved ? Icons.star_outlined : Icons.star_outlined,
color: alreadySaved ? Colors.yellow : Colors.grey), color: alreadySaved ? Colors.deepPurple : Colors.grey),
onTap: () { onTap: () {
setState(() { setState(() {
if (alreadySaved) { if (alreadySaved) {
...@@ -56,7 +56,7 @@ class _Widget3000State extends State<Widget3000> { ...@@ -56,7 +56,7 @@ class _Widget3000State extends State<Widget3000> {
Image.asset(item.image), Image.asset(item.image),
Align(alignment: Alignment.center, Align(alignment: Alignment.center,
child: Text(item.description, child: Text(item.description,
style: GoogleFonts.montserrat(textStyle: bodyStyle), style: GoogleFonts.montserrat(textStyle: bodyStyle, color: Colors.black),
textAlign: TextAlign.justify,)), textAlign: TextAlign.justify,)),
]), ]),
], ],
...@@ -88,7 +88,7 @@ class _Widget3000State extends State<Widget3000> { ...@@ -88,7 +88,7 @@ class _Widget3000State extends State<Widget3000> {
itemBuilder: (BuildContext context, int index) itemBuilder: (BuildContext context, int index)
{ {
return Container( return Container(
height: 300, height: 250,
child: Center(child: _list[index])); child: Center(child: _list[index]));
}) })
), ),
......
...@@ -7,6 +7,8 @@ import 'package:mediateque_tp1/Media.dart'; ...@@ -7,6 +7,8 @@ import 'package:mediateque_tp1/Media.dart';
import 'Widget3000.dart'; import 'Widget3000.dart';
const Color myColor = Color(0xFFCE93D8);
void main() { void main() {
runApp(MyApp()); runApp(MyApp());
} }
...@@ -19,11 +21,14 @@ class MyApp extends StatelessWidget { ...@@ -19,11 +21,14 @@ class MyApp extends StatelessWidget {
title: 'Flutter Demo', title: 'Flutter Demo',
theme: ThemeData( theme: ThemeData(
primarySwatch: Colors.blue, primaryColor: Colors.deepPurple[200],
accentColor: Colors.orange[50],
//primarySwatch: Colors.deepOrange.shade50,
visualDensity: VisualDensity.adaptivePlatformDensity, visualDensity: VisualDensity.adaptivePlatformDensity,
), ),
home: MyHomePage(title: 'Mediathèque'), home: MyHomePage(title: 'Mediathèque',),
); );
} }
} }
...@@ -38,9 +43,8 @@ class MyHomePage extends StatefulWidget { ...@@ -38,9 +43,8 @@ class MyHomePage extends StatefulWidget {
class _MyHomePageState extends State<MyHomePage> { class _MyHomePageState extends State<MyHomePage> {
int _selectedIndex = 0; int _selectedIndex = 0;
static const TextStyle optionStyle = static const TextStyle optionStyle =
TextStyle(fontSize: 30, fontWeight: FontWeight.bold); TextStyle(fontSize: 30, fontWeight: FontWeight.bold, color: Colors.white) ;
final List<String> entries = <String>['A', 'B', 'C'];
final List<int> colorCodes = <int>[600, 500, 100];
static DataBase db = new DataBase(); static DataBase db = new DataBase();
static Widget3000 affichageSeries =new Widget3000(list: db.getlistSeries(),list_fav: db.getlistSaved()); static Widget3000 affichageSeries =new Widget3000(list: db.getlistSeries(),list_fav: db.getlistSaved());
...@@ -49,7 +53,7 @@ class _MyHomePageState extends State<MyHomePage> { ...@@ -49,7 +53,7 @@ class _MyHomePageState extends State<MyHomePage> {
static List<Widget> _widgetOptions = <Widget>[ static List<Widget> _widgetOptions = <Widget>[
Text("Bienvenue dans votre Médiathèque",textAlign: TextAlign.center, style: GoogleFonts.montserrat(textStyle: TextStyle(fontSize: 40,color: Colors.blue))), Text("Bienvenue dans votre Médiathèque",textAlign: TextAlign.center, style: GoogleFonts.montserrat(textStyle: TextStyle(fontSize: 40,color: Colors.deepPurple[400]))),
affichageSeries, affichageSeries,
affichageGames, affichageGames,
affichageFav affichageFav
...@@ -67,34 +71,34 @@ class _MyHomePageState extends State<MyHomePage> { ...@@ -67,34 +71,34 @@ class _MyHomePageState extends State<MyHomePage> {
return Scaffold( return Scaffold(
appBar: AppBar( appBar: AppBar(
title: Text(widget.title), title: Text(widget.title, style: GoogleFonts.montserrat(color: Colors.white)),
), ),
body: Center(child: _widgetOptions.elementAt(_selectedIndex), body: Center(child: _widgetOptions.elementAt(_selectedIndex),
), ),
bottomNavigationBar: BottomNavigationBar( bottomNavigationBar: BottomNavigationBar(
items: const <BottomNavigationBarItem>[ items: <BottomNavigationBarItem>[
BottomNavigationBarItem( BottomNavigationBarItem(
icon: Icon(Icons.home), icon: Icon(Icons.home),
label: 'Home', label: 'Home',
backgroundColor: Colors.blue backgroundColor: Colors.deepPurple[200]
), ),
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 backgroundColor: Colors.deepPurple[200]
), ),
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 backgroundColor: Colors.deepPurple[200]
), ),
BottomNavigationBarItem( BottomNavigationBarItem(
icon: Icon(Icons.star_outline_outlined), icon: Icon(Icons.star_outline_outlined),
label: 'Mes favoris', label: 'Mes favoris',
backgroundColor: Colors.blue backgroundColor: Colors.deepPurple[200]
), ),
], ],
......
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