Commit f97716bd authored by Timothé KOBAK's avatar Timothé KOBAK

couleur UI voir couloor palette sur whatsapp

parent a14a2061
...@@ -11,6 +11,18 @@ class TindBook extends StatelessWidget { ...@@ -11,6 +11,18 @@ class TindBook extends StatelessWidget {
return ChangeNotifierProvider( return ChangeNotifierProvider(
create: (context) => TindBookState(), create: (context) => TindBookState(),
child: MaterialApp( child: MaterialApp(
theme: ThemeData(
primarySwatch: Colors.blue,
primaryColor: Color.fromRGBO(204, 213, 174, 1),
backgroundColor: Color.fromRGBO(233, 237, 201, 1),
scaffoldBackgroundColor: Color.fromRGBO(254, 250, 224, 1),
appBarTheme: AppBarTheme(
backgroundColor: Color.fromRGBO(204, 213, 174, 1), // Set app bar color
),
navigationRailTheme: NavigationRailThemeData(
backgroundColor: Color.fromRGBO(212, 163, 115, 1), // Set navigation rail color
),
),
title: 'Tind Book', title: 'Tind Book',
home: Scaffold( home: Scaffold(
appBar: AppBar(title: const Text('Draggable Sample')), appBar: AppBar(title: const Text('Draggable Sample')),
...@@ -109,9 +121,13 @@ class _MyHomePageState extends State<MyHomePage> { ...@@ -109,9 +121,13 @@ class _MyHomePageState extends State<MyHomePage> {
}, },
), ),
), ),
VerticalDivider(
thickness: 1,
width: 1,
), // Add a vertical divider
Expanded( Expanded(
child: Container( child: Container(
color: Theme.of(context).colorScheme.primaryContainer, color: Color.fromRGBO(250, 237, 205, 1),
child: page, child: page,
), ),
), ),
...@@ -166,10 +182,10 @@ class _TindBookContentState extends State<TindBookContent> { ...@@ -166,10 +182,10 @@ class _TindBookContentState extends State<TindBookContent> {
if (_isSwiping) { if (_isSwiping) {
_isSwiping = false; _isSwiping = false;
if (_deltaX > 50) { if (_deltaX > 50) {
// Droite // Swipe right
state.handleSwipe(1); state.handleSwipe(1);
} else if (_deltaX < -50) { } else if (_deltaX < -50) {
//Gauche // Swipe left
state.handleSwipe(-1); state.handleSwipe(-1);
} }
} }
...@@ -181,9 +197,9 @@ class _TindBookContentState extends State<TindBookContent> { ...@@ -181,9 +197,9 @@ class _TindBookContentState extends State<TindBookContent> {
children: [ children: [
Positioned.fill( Positioned.fill(
child: Container( child: Container(
color: Colors.deepOrange, color: Color.fromRGBO(250, 237, 205, 1),
height: containerHeight, height: containerHeight / 3,
width: containerWidth, width: containerWidth / 3,
), ),
), ),
Positioned( Positioned(
...@@ -194,12 +210,49 @@ class _TindBookContentState extends State<TindBookContent> { ...@@ -194,12 +210,49 @@ class _TindBookContentState extends State<TindBookContent> {
child: Transform.translate( child: Transform.translate(
offset: Offset(_deltaX, 0.0), offset: Offset(_deltaX, 0.0),
child: Transform.rotate( child: Transform.rotate(
angle: _deltaX * 0.0002, angle: _deltaX * 0.0002, // Adjust the rotation speed here
child: ClipRRect(
borderRadius: BorderRadius.circular(100), // Adjust the radius as needed
child: Image.asset( child: Image.asset(
state.imagePaths[state.currentImageIndex], state.imagePaths[state.currentImageIndex],
height: containerHeight, height: containerHeight / 3, // Adjust image height
width: containerWidth, width: containerWidth / 3, // Adjust image width
fit: BoxFit.contain,
),
),
),
),
), ),
Positioned(
top: 20,
left: 20,
right: 20,
child: Container(
padding: EdgeInsets.all(10),
decoration: BoxDecoration(
color: Colors.black.withOpacity(0.5),
borderRadius: BorderRadius.circular(10),
),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(
'Titre du livre ',
style: TextStyle(
color: Colors.white,
fontSize: 20,
fontWeight: FontWeight.bold,
),
),
SizedBox(height: 5),
Text(
'un tres bon livre qui parle de beaucoup chose , notamment mais aussi de lorem ipsum dolor sit amet a m Doctrine est pas de ',
style: TextStyle(
color: Colors.white,
fontSize: 16,
),
),
],
), ),
), ),
), ),
......
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