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 {
return ChangeNotifierProvider(
create: (context) => TindBookState(),
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',
home: Scaffold(
appBar: AppBar(title: const Text('Draggable Sample')),
......@@ -109,9 +121,13 @@ class _MyHomePageState extends State<MyHomePage> {
},
),
),
VerticalDivider(
thickness: 1,
width: 1,
), // Add a vertical divider
Expanded(
child: Container(
color: Theme.of(context).colorScheme.primaryContainer,
color: Color.fromRGBO(250, 237, 205, 1),
child: page,
),
),
......@@ -166,10 +182,10 @@ class _TindBookContentState extends State<TindBookContent> {
if (_isSwiping) {
_isSwiping = false;
if (_deltaX > 50) {
// Droite
// Swipe right
state.handleSwipe(1);
} else if (_deltaX < -50) {
//Gauche
// Swipe left
state.handleSwipe(-1);
}
}
......@@ -181,9 +197,9 @@ class _TindBookContentState extends State<TindBookContent> {
children: [
Positioned.fill(
child: Container(
color: Colors.deepOrange,
height: containerHeight,
width: containerWidth,
color: Color.fromRGBO(250, 237, 205, 1),
height: containerHeight / 3,
width: containerWidth / 3,
),
),
Positioned(
......@@ -194,12 +210,49 @@ class _TindBookContentState extends State<TindBookContent> {
child: Transform.translate(
offset: Offset(_deltaX, 0.0),
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(
state.imagePaths[state.currentImageIndex],
height: containerHeight,
width: containerWidth,
height: containerHeight / 3, // Adjust image height
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