diff --git a/Sources/dafl_project_flutter/assets/images/loadingPlaceholder.gif b/Sources/dafl_project_flutter/assets/images/loadingPlaceholder.gif new file mode 100644 index 0000000..490bf64 Binary files /dev/null and b/Sources/dafl_project_flutter/assets/images/loadingPlaceholder.gif differ diff --git a/Sources/dafl_project_flutter/lib/views/pages/main/p_main.dart b/Sources/dafl_project_flutter/lib/views/pages/main/p_main.dart index bbdb13e..2944a0c 100644 --- a/Sources/dafl_project_flutter/lib/views/pages/main/p_main.dart +++ b/Sources/dafl_project_flutter/lib/views/pages/main/p_main.dart @@ -4,6 +4,7 @@ import './w_settings.dart'; import './w_spot.dart'; import './w_discovery.dart'; import './w_profile.dart'; +import './w_messages.dart'; class MainPage extends StatefulWidget { const MainPage({Key? key}) : super(key: key); @@ -21,7 +22,7 @@ class _MainPageState extends State { DiscoveryWidget(), SpotsWidget(), Center(child: Text('Tops'),), - Center(child: Text('Messages'),), + MessagesWidget(), SettingsWidget(), ]; @override diff --git a/Sources/dafl_project_flutter/lib/views/pages/main/w_card.dart b/Sources/dafl_project_flutter/lib/views/pages/main/w_card.dart index 6eef2c1..56e7f84 100644 --- a/Sources/dafl_project_flutter/lib/views/pages/main/w_card.dart +++ b/Sources/dafl_project_flutter/lib/views/pages/main/w_card.dart @@ -12,7 +12,7 @@ class User{ required this.chanteur, required this.titre, required this.urlImage, -}); + }); } @@ -44,21 +44,21 @@ class _CardWidgetState extends State{ } @override Widget build(BuildContext context) => SizedBox.expand( - child: widget.isFront ? buildFrontCard() : buildCard(), - ); + child: widget.isFront ? buildFrontCard() : buildCard(), + ); Widget buildCard() => ClipRRect( borderRadius: BorderRadius.circular(20), child: Container( decoration: BoxDecoration( - image: DecorationImage( - image: NetworkImage(widget.urlImage), - fit: BoxFit.cover, - alignment: Alignment(0,0), - ), borderRadius: BorderRadius.all(Radius.circular(20)) ), + child: FadeInImage.assetNetwork( + height: double.infinity, + width: double.infinity, + fit: BoxFit.cover, + placeholder: "assets/images/loadingPlaceholder.gif", image: widget.urlImage), ), ); @@ -84,29 +84,29 @@ class _CardWidgetState extends State{ } Widget buildStamp({ - double angle = 0, + double angle = 0, required String image, required double opacity, -}) { + }) { return Opacity(opacity: opacity, - child: ClipRRect( - borderRadius: BorderRadius.circular(20), - child: Container( - decoration: BoxDecoration( - color: Colors.black.withOpacity(0.75), - border: Border.all(color: Color(0xFF3F1DC3), width: 6), - - borderRadius: BorderRadius.all(Radius.circular(20)) - ), - child: Center( - child: Image.asset( - image, - width: 100, + child: ClipRRect( + borderRadius: BorderRadius.circular(20), + child: Container( + decoration: BoxDecoration( + color: Colors.black.withOpacity(0.75), + border: Border.all(color: Color(0xFF3F1DC3), width: 6), + + borderRadius: BorderRadius.all(Radius.circular(20)) ), + child: Center( + child: Image.asset( + image, + width: 100, + ), + ), ), - ), - ),); + ),); } Widget buildFrontCard() => GestureDetector( diff --git a/Sources/dafl_project_flutter/lib/views/pages/main/w_discovery.dart b/Sources/dafl_project_flutter/lib/views/pages/main/w_discovery.dart index 0939e2b..e06afd6 100644 --- a/Sources/dafl_project_flutter/lib/views/pages/main/w_discovery.dart +++ b/Sources/dafl_project_flutter/lib/views/pages/main/w_discovery.dart @@ -13,162 +13,197 @@ class _DiscoveryWidgetState extends State { @override Widget build(BuildContext context) { - return Scaffold( - backgroundColor: Color(0xFF141414), - resizeToAvoidBottomInset: false, - - body: Padding(padding: EdgeInsets.fromLTRB(30, 50, 30, 0), - child: Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Container( - child: Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Row( - children: [ - Text('Playlist découverte', style: TextStyle(color: Colors.white, fontWeight: FontWeight.w500, fontSize: 25),), - Spacer(), - Icon(FontAwesome5.sort_amount_down, size: 30, color: Colors.white,), - ] - ), - Padding(padding: EdgeInsets.fromLTRB(0, 5, 0, 0)), - Text('Retrouvez ici vos nouvelles découvertes.', style: TextStyle(color: Colors.grey.withOpacity(0.4), fontSize: 15),), - ], - ), + return Container( + color: Color(0xFF141414), + + child: Padding(padding: EdgeInsets.fromLTRB(30, 50, 30, 0), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Container( + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Row( + children: [ + Text('Playlist découverte', style: TextStyle(color: Colors.white, fontWeight: FontWeight.w500, fontSize: 25),), + Spacer(), + Icon(FontAwesome5.sort_amount_down, size: 30, color: Colors.white,), + ] + ), + Padding(padding: EdgeInsets.fromLTRB(0, 5, 0, 0)), + Text('Retrouvez ici vos nouvelles découvertes.', style: TextStyle(color: Colors.grey.withOpacity(0.4), fontSize: 15),), + ], ), - Expanded( - child: ListView( - - children: [ - SizedBox(height: 40,), - Container( - margin: EdgeInsets.fromLTRB(0, 10, 0, 0), - child: Column( - children: [ - - Container( - margin: EdgeInsets.fromLTRB(0, 5, 0, 0), - width: double.infinity, - child: Row( - children: [ - Container( - height: 60, - width: 60, - decoration: BoxDecoration( - image: DecorationImage( - image: NetworkImage('https://www.goutemesdisques.com/uploads/tx_gmdchron/pi1/L_Etrange_Histoire_de_Mr_Anderson.jpg'), - fit: BoxFit.cover, - ), - border: Border.all(width: 0, color: Colors.grey.withOpacity(0)), - borderRadius: BorderRadius.all(Radius.circular(10)), - ),), - Container( - margin: EdgeInsets.fromLTRB(20, 0, 0, 0), - child: Column( - crossAxisAlignment: CrossAxisAlignment.start, - mainAxisAlignment: MainAxisAlignment.center, - children: [ - Text('IVERSON',style: TextStyle(fontFamily: 'DMSans', color: Colors.white.withOpacity(1) ,fontSize: 20, fontWeight: FontWeight.w800),), - Text('Laylow',style: TextStyle(fontFamily: 'DMSans', color: Colors.white.withOpacity(0.6) ,fontSize: 16, fontWeight: FontWeight.w400),), - - ], - ),), - ], - ), + ), + Expanded( + child: ListView( + + children: [ + SizedBox(height: 40,), + Container( + margin: EdgeInsets.fromLTRB(0, 10, 0, 0), + child: Column( + children: [ + + Container( + margin: EdgeInsets.fromLTRB(0, 5, 0, 0), + width: double.infinity, + child: Row( + children: [ + Container( + height: 60, + width: 60, + decoration: BoxDecoration( + border: Border.all(width: 0, color: Colors.grey.withOpacity(0)), + borderRadius: BorderRadius.all(Radius.circular(10)), + ), + child: Container( + child: FadeInImage.assetNetwork(placeholder: "assets/images/loadingPlaceholder.gif", image: 'https://www.goutemesdisques.com/uploads/tx_gmdchron/pi1/L_Etrange_Histoire_de_Mr_Anderson.jpg'), + ),), + Container( + margin: EdgeInsets.fromLTRB(20, 0, 0, 0), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + mainAxisAlignment: MainAxisAlignment.center, + children: [ + Text('IVERSON',style: TextStyle(fontFamily: 'DMSans', color: Colors.white.withOpacity(1) ,fontSize: 20, fontWeight: FontWeight.w800),), + Text('Laylow',style: TextStyle(fontFamily: 'DMSans', color: Colors.white.withOpacity(0.6) ,fontSize: 16, fontWeight: FontWeight.w400),), + + ], + ),), + ], + ), + ), + + + ], + ) + ), + Container( + margin: EdgeInsets.fromLTRB(0, 10, 0, 0), + child: Column( + children: [ + + Container( + margin: EdgeInsets.fromLTRB(0, 5, 0, 0), + width: double.infinity, + child: Row( + children: [ + Container( + height: 60, + width: 60, + decoration: BoxDecoration( + border: Border.all(width: 0, color: Colors.grey.withOpacity(0)), + borderRadius: BorderRadius.all(Radius.circular(10)), + ), + child: Container( + child: FadeInImage.assetNetwork(placeholder: "assets/images/loadingPlaceholder.gif", image: 'https://www.goutemesdisques.com/uploads/tx_gmdchron/pi1/L_Etrange_Histoire_de_Mr_Anderson.jpg'), + ),), + Container( + margin: EdgeInsets.fromLTRB(20, 0, 0, 0), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + mainAxisAlignment: MainAxisAlignment.center, + children: [ + Text('IVERSON',style: TextStyle(fontFamily: 'DMSans', color: Colors.white.withOpacity(1) ,fontSize: 20, fontWeight: FontWeight.w800),), + Text('Laylow',style: TextStyle(fontFamily: 'DMSans', color: Colors.white.withOpacity(0.6) ,fontSize: 16, fontWeight: FontWeight.w400),), + + ], + ),), + ], ), + ), + + ], + ) + ), + Container( + margin: EdgeInsets.fromLTRB(0, 10, 0, 0), + child: Column( + children: [ - ], - ) - ), - Container( - margin: EdgeInsets.fromLTRB(0, 10, 0, 0), - child: Column( - children: [ - - Container( - margin: EdgeInsets.fromLTRB(0, 5, 0, 0), - width: double.infinity, - child: Row( - children: [ - Container( - height: 60, - width: 60, - decoration: BoxDecoration( - image: DecorationImage( - image: NetworkImage('https://www.goutemesdisques.com/uploads/tx_gmdchron/pi1/L_Etrange_Histoire_de_Mr_Anderson.jpg'), - fit: BoxFit.cover, - ), - border: Border.all(width: 0, color: Colors.grey.withOpacity(0)), - borderRadius: BorderRadius.all(Radius.circular(10)), - ),), - Container( - margin: EdgeInsets.fromLTRB(20, 0, 0, 0), - child: Column( - crossAxisAlignment: CrossAxisAlignment.start, - mainAxisAlignment: MainAxisAlignment.center, - children: [ - Text('IVERSON',style: TextStyle(fontFamily: 'DMSans', color: Colors.white.withOpacity(1) ,fontSize: 20, fontWeight: FontWeight.w800),), - Text('Laylow',style: TextStyle(fontFamily: 'DMSans', color: Colors.white.withOpacity(0.6) ,fontSize: 16, fontWeight: FontWeight.w400),), - - ], - ),), - ], - ), + Container( + margin: EdgeInsets.fromLTRB(0, 5, 0, 0), + width: double.infinity, + child: Row( + children: [ + Container( + height: 60, + width: 60, + decoration: BoxDecoration( + border: Border.all(width: 0, color: Colors.grey.withOpacity(0)), + borderRadius: BorderRadius.all(Radius.circular(10)), + ), + child: Container( + child: FadeInImage.assetNetwork(placeholder: "assets/images/loadingPlaceholder.gif", image: 'https://www.goutemesdisques.com/uploads/tx_gmdchron/pi1/L_Etrange_Histoire_de_Mr_Anderson.jpg'), + ),), + Container( + margin: EdgeInsets.fromLTRB(20, 0, 0, 0), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + mainAxisAlignment: MainAxisAlignment.center, + children: [ + Text('IVERSON',style: TextStyle(fontFamily: 'DMSans', color: Colors.white.withOpacity(1) ,fontSize: 20, fontWeight: FontWeight.w800),), + Text('Laylow',style: TextStyle(fontFamily: 'DMSans', color: Colors.white.withOpacity(0.6) ,fontSize: 16, fontWeight: FontWeight.w400),), + + ], + ),), + ], ), + ), + + ], + ) + ), + Container( + margin: EdgeInsets.fromLTRB(0, 10, 0, 0), + child: Column( + children: [ - ], - ) - ), - Container( - margin: EdgeInsets.fromLTRB(0, 10, 0, 0), - child: Column( - children: [ - - Container( - margin: EdgeInsets.fromLTRB(0, 5, 0, 0), - width: double.infinity, - child: Row( - children: [ - Container( - height: 60, - width: 60, - decoration: BoxDecoration( - image: DecorationImage( - image: NetworkImage('https://www.goutemesdisques.com/uploads/tx_gmdchron/pi1/L_Etrange_Histoire_de_Mr_Anderson.jpg'), - fit: BoxFit.cover, - ), - border: Border.all(width: 0, color: Colors.grey.withOpacity(0)), - borderRadius: BorderRadius.all(Radius.circular(10)), - ),), - Container( - margin: EdgeInsets.fromLTRB(20, 0, 0, 0), - child: Column( - crossAxisAlignment: CrossAxisAlignment.start, - mainAxisAlignment: MainAxisAlignment.center, - children: [ - Text('IVERSON',style: TextStyle(fontFamily: 'DMSans', color: Colors.white.withOpacity(1) ,fontSize: 20, fontWeight: FontWeight.w800),), - Text('Laylow',style: TextStyle(fontFamily: 'DMSans', color: Colors.white.withOpacity(0.6) ,fontSize: 16, fontWeight: FontWeight.w400),), - - ], - ),), - ], - ), + Container( + margin: EdgeInsets.fromLTRB(0, 5, 0, 0), + width: double.infinity, + child: Row( + children: [ + Container( + height: 60, + width: 60, + decoration: BoxDecoration( + border: Border.all(width: 0, color: Colors.grey.withOpacity(0)), + borderRadius: BorderRadius.all(Radius.circular(10)), + ), + child: Container( + child: FadeInImage.assetNetwork(placeholder: "assets/images/loadingPlaceholder.gif", image: 'https://www.goutemesdisques.com/uploads/tx_gmdchron/pi1/L_Etrange_Histoire_de_Mr_Anderson.jpg'), + ),), + Container( + margin: EdgeInsets.fromLTRB(20, 0, 0, 0), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + mainAxisAlignment: MainAxisAlignment.center, + children: [ + Text('IVERSON',style: TextStyle(fontFamily: 'DMSans', color: Colors.white.withOpacity(1) ,fontSize: 20, fontWeight: FontWeight.w800),), + Text('Laylow',style: TextStyle(fontFamily: 'DMSans', color: Colors.white.withOpacity(0.6) ,fontSize: 16, fontWeight: FontWeight.w400),), + + ], + ),), + ], ), + ), - ], - ) - ), + ], + ) + ), - ], - ), + ], ), - ], - ),), + ), + ], + ),), ); } } diff --git a/Sources/dafl_project_flutter/lib/views/pages/main/w_messages.dart b/Sources/dafl_project_flutter/lib/views/pages/main/w_messages.dart new file mode 100644 index 0000000..4f51074 --- /dev/null +++ b/Sources/dafl_project_flutter/lib/views/pages/main/w_messages.dart @@ -0,0 +1,215 @@ +import 'package:flutter/material.dart'; +import 'package:fluttericon/font_awesome5_icons.dart'; + +class MessagesWidget extends StatefulWidget { + const MessagesWidget({Key? key}) : super(key: key); + + @override + State createState() => _MessagesWidgetState(); +} + +class _MessagesWidgetState extends State { + int indexSectedButton = 0; + Widget listeActuelle = ListConfirmedWidget(); + + + var colorConfirm = Color(0xFFFFFFFF); + var colorWaiting = Color(0xFFA8A8A8); + void changeSelected(int num){ + if(indexSectedButton == num){ + return; + } + else{ + if(num == 0){ + setState((){ + colorConfirm = Color(0xFFFFFFFF); + colorWaiting = Color(0xFFA8A8A8); + listeActuelle = ListConfirmedWidget(); + indexSectedButton = num; + }); + + + } + else{ + setState((){ + colorConfirm = Color(0xFFA8A8A8); + colorWaiting = Color(0xFFFFFFFF); + listeActuelle = ListWaitingWidget(); + indexSectedButton = num; + }); + } + + } + } + + @override + + Widget build(BuildContext context) { + double height = MediaQuery.of(context).size.height; + double width = MediaQuery.of(context).size.width; + return Container( + color: Color(0xFF141414), + + child: Padding(padding: EdgeInsets.fromLTRB(30, 50, 30, 0), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Container( + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Text('Messages', style: TextStyle(color: Colors.white, fontWeight: FontWeight.w500, fontSize: 25)), + Padding(padding: EdgeInsets.fromLTRB(0, 5, 0, 0)), + Text('Retrouvez ici vos discussions.', style: TextStyle(color: Colors.grey.withOpacity(0.4), fontSize: 15),), + Padding( + padding: EdgeInsets.fromLTRB(0, height*0.01, 0, 0), + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceAround, + children: [ + SizedBox( + height: 35, + width: width*0.35, + child: ElevatedButton( + style: ElevatedButton.styleFrom( + backgroundColor: colorConfirm, + shape: RoundedRectangleBorder( + borderRadius: BorderRadius.circular(15.0), + ),// background// foreground + ), + onPressed: () { + changeSelected(0); + }, + child: Text("Validées", + style: TextStyle(color: Colors.black ,fontSize: 17, fontWeight: FontWeight.bold), + textAlign: TextAlign.center, + ), + ),), + SizedBox( + height: 35, + width: width*0.35, + child: ElevatedButton( + style: ElevatedButton.styleFrom( + backgroundColor: colorWaiting, + shape: RoundedRectangleBorder( + borderRadius: BorderRadius.circular(15.0), + ),// background// foreground + ), + onPressed: () { + changeSelected(1); + }, + child: Text("En attente", + style: TextStyle(color: Colors.black ,fontSize: 17, fontWeight: FontWeight.bold), + textAlign: TextAlign.center, + ), + ),), + ], + ),), + ], + ), + ), + Expanded( + child: + listeActuelle, + + + ), + ], + ),), + ); + } +} + +class MessagesButtonWidget extends StatelessWidget{ + @override + Widget build(BuildContext context) { + double height = MediaQuery.of(context).size.height; + double width = MediaQuery.of(context).size.width; + return Container( + margin: EdgeInsets.fromLTRB(0, 0, 0, 10), + child: Column( + children: [ + + Container( + margin: EdgeInsets.fromLTRB(0, 5, 0, 0), + child: Row( + children: [ + Container( + height: 60, + width: 60, + decoration: BoxDecoration( + image: DecorationImage( + image: NetworkImage('https://www.goutemesdisques.com/uploads/tx_gmdchron/pi1/L_Etrange_Histoire_de_Mr_Anderson.jpg'), + fit: BoxFit.cover, + ), + border: Border.all(width: 0, color: Colors.grey.withOpacity(0)), + borderRadius: BorderRadius.all(Radius.circular(30)), + ),), + Container( + width: width-160, + margin: EdgeInsets.fromLTRB(20, 0, 20, 0), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + mainAxisAlignment: MainAxisAlignment.center, + children: [ + Row( + crossAxisAlignment: CrossAxisAlignment.center, + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + Text('Max',style: TextStyle(fontFamily: 'DMSans', color: Colors.white.withOpacity(1) ,fontSize: 20, fontWeight: FontWeight.w800),), + Spacer(), + Text('1 jour(s)',style: TextStyle(fontFamily: 'DMSans', color: Colors.white.withOpacity(0.8) ,fontSize: 15, fontWeight: FontWeight.w400),), + ], + ), + Text('A envoyé un musique.',style: TextStyle(fontFamily: 'DMSans', color: Colors.white.withOpacity(0.6) ,fontSize: 16, fontWeight: FontWeight.w400),), + + ], + ),), + ], + ), + ), + + + ], + ) + ); + + } +} + +class ListConfirmedWidget extends StatelessWidget{ + @override + Widget build(BuildContext context) { + double height = MediaQuery.of(context).size.height; + double width = MediaQuery.of(context).size.width; + return ListView( + + children: [ + SizedBox(height: 40,), + MessagesButtonWidget(), + MessagesButtonWidget(), + MessagesButtonWidget(), + MessagesButtonWidget(), + + + ], + ); + + } +} + +class ListWaitingWidget extends StatelessWidget{ + @override + Widget build(BuildContext context) { + double height = MediaQuery.of(context).size.height; + double width = MediaQuery.of(context).size.width; + return ListView( + + children: [ + SizedBox(height: 40,), + MessagesButtonWidget(), + + ], + ); + + } +} \ No newline at end of file diff --git a/Sources/dafl_project_flutter/lib/views/pages/main/w_profile.dart b/Sources/dafl_project_flutter/lib/views/pages/main/w_profile.dart index b38784c..bec4151 100644 --- a/Sources/dafl_project_flutter/lib/views/pages/main/w_profile.dart +++ b/Sources/dafl_project_flutter/lib/views/pages/main/w_profile.dart @@ -16,198 +16,209 @@ class _ProfilWidgetState extends State { Widget build(BuildContext context) { double height = MediaQuery.of(context).size.height; + return MainPageProfil(); + } +} + +class MainPageProfil extends StatelessWidget { + const MainPageProfil({super.key}); + + @override + Widget build(BuildContext context) { + double height = MediaQuery.of(context).size.height; + double width = MediaQuery.of(context).size.width; return Container( color: Color(0xFF141414), - child: Container( - width: double.infinity, - height: double.infinity, - child: Column( - crossAxisAlignment: CrossAxisAlignment.center, - children: [ - Container( - width: double.infinity, - margin: EdgeInsets.fromLTRB(30, 50, 0, 0), - child: Text( - "Profil", - style: TextStyle(fontSize: 25, fontWeight: FontWeight.w600, color: Colors.white),), - ), - Container( - margin: EdgeInsets.fromLTRB(0, 10, 0, 40), - height: height*0.14, - width: height*0.14, - decoration: BoxDecoration( - borderRadius: BorderRadius.circular(100.0), - color: Colors.blue,border: Border.all(width: 6.0, color: Colors.white), - + child: Container( + width: double.infinity, + height: double.infinity, + child: Column( + crossAxisAlignment: CrossAxisAlignment.center, + children: [ + Container( + width: double.infinity, + margin: EdgeInsets.fromLTRB(30, 50, 0, 0), + child: Text( + "Profil", + style: TextStyle(fontSize: 25, fontWeight: FontWeight.w600, color: Colors.white),), ), - ), - Container( - height: 55, - width: double.infinity, - decoration: BoxDecoration( - borderRadius: BorderRadius.circular(10.0), - color: Colors.transparent, + Container( + margin: EdgeInsets.fromLTRB(0, 10, 0, 40), + height: height*0.14, + width: height*0.14, + decoration: BoxDecoration( + borderRadius: BorderRadius.circular(100.0), + color: Colors.blue,border: Border.all(width: 6.0, color: Colors.white), + + ), ), - margin: EdgeInsets.fromLTRB(30, 0, 30, 0), - child: SizedBox( + Container( height: 55, width: double.infinity, - child: ElevatedButton( - style: ElevatedButton.styleFrom( - backgroundColor: Color(0xFFD9D9D9).withOpacity(0.08), - shape: RoundedRectangleBorder( - borderRadius: BorderRadius.circular(10.0), - ),// background// foreground - ), - onPressed: () { - }, - child: Row( - children: [ - Image.asset('assets/images/fav_logo.png', height: 25,), - SizedBox(width: 12,), - Text("Préférences musicales", - style: TextStyle(color: Colors.white ,fontSize: 17, fontWeight: FontWeight.w400), - textAlign: TextAlign.center, - ), - Spacer(), - Icon(Icons.arrow_forward_ios, color: Colors.white.withOpacity(0.3),), - ], - ) - ),), - ), - Container( - height: 55, - width: double.infinity, - decoration: BoxDecoration( - borderRadius: BorderRadius.circular(10.0), - color: Colors.transparent, + decoration: BoxDecoration( + borderRadius: BorderRadius.circular(10.0), + color: Colors.transparent, + ), + margin: EdgeInsets.fromLTRB(30, 0, 30, 0), + child: SizedBox( + height: 55, + width: double.infinity, + child: ElevatedButton( + style: ElevatedButton.styleFrom( + backgroundColor: Color(0xFFD9D9D9).withOpacity(0.08), + shape: RoundedRectangleBorder( + borderRadius: BorderRadius.circular(10.0), + ),// background// foreground + ), + onPressed: () { + }, + child: Row( + children: [ + Image.asset('assets/images/fav_logo.png', height: 25,), + SizedBox(width: 12,), + Text("Préférences musicales", + style: TextStyle(color: Colors.white ,fontSize: 17, fontWeight: FontWeight.w400), + textAlign: TextAlign.center, + ), + Spacer(), + Icon(Icons.arrow_forward_ios, color: Colors.white.withOpacity(0.3),), + ], + ) + ),), ), - margin: EdgeInsets.fromLTRB(30, 10, 30, 0), - child: SizedBox( + Container( height: 55, width: double.infinity, - child: ElevatedButton( - style: ElevatedButton.styleFrom( - backgroundColor: Color(0xFFD9D9D9).withOpacity(0.08), - shape: RoundedRectangleBorder( - borderRadius: BorderRadius.circular(10.0), - ),// background// foreground - ), - onPressed: () { - Navigator.push(context,MaterialPageRoute(builder: (context)=> DisplayInfoWidget())); - }, - child: Row( + decoration: BoxDecoration( + borderRadius: BorderRadius.circular(10.0), + color: Colors.transparent, + ), + margin: EdgeInsets.fromLTRB(30, 10, 30, 0), + child: SizedBox( + height: 55, + width: double.infinity, + child: ElevatedButton( + style: ElevatedButton.styleFrom( + backgroundColor: Color(0xFFD9D9D9).withOpacity(0.08), + shape: RoundedRectangleBorder( + borderRadius: BorderRadius.circular(10.0), + ),// background// foreground + ), + onPressed: () { + Navigator.push(context,MaterialPageRoute(builder: (context)=> DisplayInfoWidget())); + }, + child: Row( + children: [ + Icon(Icons.remove_red_eye, color: Colors.white,size: 30,), + SizedBox(width: 12,), + Text("Aperçu de mon profil", + style: TextStyle(color: Colors.white ,fontSize: 17, fontWeight: FontWeight.w400), + textAlign: TextAlign.center, + ), + Spacer(), + Icon(Icons.arrow_forward_ios, color: Colors.white.withOpacity(0.3),), + ], + ) + ),), + ), + Container( + height: height*0.27, + width: double.infinity, + margin: EdgeInsets.fromLTRB(30, 15, 30, 0), + child: Column( + children: [ + Row( + mainAxisAlignment: MainAxisAlignment.start, + crossAxisAlignment: CrossAxisAlignment.center, children: [ - Icon(Icons.remove_red_eye, color: Colors.white,size: 30,), - SizedBox(width: 12,), - Text("Aperçu de mon profil", + Icon(Icons.wifi_tethering, color: Colors.white, size: 35,), + SizedBox(width: 10,), + Text("En cours d'écoute...", style: TextStyle(color: Colors.white ,fontSize: 17, fontWeight: FontWeight.w400), textAlign: TextAlign.center, ), - Spacer(), - Icon(Icons.arrow_forward_ios, color: Colors.white.withOpacity(0.3),), ], - ) - ),), - ), - Container( - height: height*0.27, - width: double.infinity, - margin: EdgeInsets.fromLTRB(30, 15, 30, 0), - child: Column( - children: [ - Row( - mainAxisAlignment: MainAxisAlignment.start, - crossAxisAlignment: CrossAxisAlignment.center, - children: [ - Icon(Icons.wifi_tethering, color: Colors.white, size: 35,), - SizedBox(width: 10,), - Text("En cours d'écoute...", - style: TextStyle(color: Colors.white ,fontSize: 17, fontWeight: FontWeight.w400), - textAlign: TextAlign.center, - ), - ], - ), - Container( - margin: EdgeInsets.fromLTRB(0, 10, 0, 0), - height: height*0.14, - decoration: BoxDecoration( - borderRadius: BorderRadius.circular(15.0), - color: Color(0xFFD9D9D9).withOpacity(0.08), ), - child: - Row( - mainAxisAlignment: MainAxisAlignment.start, - crossAxisAlignment: CrossAxisAlignment.center, - children: [ - Container( - margin: EdgeInsets.fromLTRB(15, 0, 0, 0), - child: ClipRRect( - borderRadius: BorderRadius.circular(15), - child: Image( - height: 90, - width: 90, - image: NetworkImage('https://images.genius.com/ef4849be3da5fdb22ea9e656679be3a3.600x600x1.jpg'), + Container( + margin: EdgeInsets.fromLTRB(0, 10, 0, 0), + height: height*0.14, + decoration: BoxDecoration( + borderRadius: BorderRadius.circular(15.0), + color: Color(0xFFD9D9D9).withOpacity(0.08), + ), + child: + Row( + mainAxisAlignment: MainAxisAlignment.start, + crossAxisAlignment: CrossAxisAlignment.center, + children: [ + Container( + margin: EdgeInsets.fromLTRB(15, 0, 0, 0), + child: ClipRRect( + borderRadius: BorderRadius.circular(15), + child: FadeInImage.assetNetwork( + height: 90, + width: 90, + placeholder: "assets/images/loadingPlaceholder.gif", image: 'https://images.genius.com/ef4849be3da5fdb22ea9e656679be3a3.600x600x1.jpg'), ), ), - ), - Container( - margin: EdgeInsets.fromLTRB(12, 20, 0, 0), - child: Column( - mainAxisAlignment: MainAxisAlignment.start, - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Text('BAMBINA', style: TextStyle(fontSize:18, fontWeight: FontWeight.w500, color: Colors.white),), - Text('PNL', style: TextStyle(fontSize:16, fontWeight: FontWeight.w400, color: Colors.grey),), - ], - ), - ) + Container( + margin: EdgeInsets.fromLTRB(12, 20, 0, 0), + child: Column( + mainAxisAlignment: MainAxisAlignment.start, + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Text('BAMBINA', style: TextStyle(fontSize:18, fontWeight: FontWeight.w500, color: Colors.white),), + Text('PNL', style: TextStyle(fontSize:16, fontWeight: FontWeight.w400, color: Colors.grey),), + ], + ), + ) - ], + ], + ), ), - ), - ], - ), - ), - Spacer(), - Container( - height: 55, - width: double.infinity, - decoration: BoxDecoration( - borderRadius: BorderRadius.circular(10.0), - color: Colors.transparent, + ], + ), ), - margin: EdgeInsets.fromLTRB(30, 0, 30, height*0.04), - child: SizedBox( + Spacer(), + Container( height: 55, width: double.infinity, - child: ElevatedButton( - style: ElevatedButton.styleFrom( - backgroundColor: Color(0xFFD9D9D9).withOpacity(0.08), - shape: RoundedRectangleBorder( - borderRadius: BorderRadius.circular(10.0), - ),// background// foreground - ), - onPressed: () { - Navigator.push(context,MaterialPageRoute(builder: (context)=> SettingsWidget())); - }, - child: Row( - children: [ - Icon(Icons.settings, color: Colors.white,size: 30,), - SizedBox(width: 12,), - Text("Paramètres", - style: TextStyle(color: Colors.white ,fontSize: 17, fontWeight: FontWeight.w400), - textAlign: TextAlign.center, - ), - Spacer(), - Icon(Icons.arrow_forward_ios, color: Colors.white.withOpacity(0.3),), - ], - ) - ),), - ), - ], + decoration: BoxDecoration( + borderRadius: BorderRadius.circular(10.0), + color: Colors.transparent, + ), + margin: EdgeInsets.fromLTRB(30, 0, 30, height*0.04), + child: SizedBox( + height: 55, + width: double.infinity, + child: ElevatedButton( + style: ElevatedButton.styleFrom( + backgroundColor: Color(0xFFD9D9D9).withOpacity(0.08), + shape: RoundedRectangleBorder( + borderRadius: BorderRadius.circular(10.0), + ),// background// foreground + ), + onPressed: () { + Navigator.push(context,MaterialPageRoute(builder: (context)=> SettingsWidget())); + }, + child: Row( + children: [ + Icon(Icons.settings, color: Colors.white,size: 30,), + SizedBox(width: 12,), + Text("Paramètres", + style: TextStyle(color: Colors.white ,fontSize: 17, fontWeight: FontWeight.w400), + textAlign: TextAlign.center, + ), + Spacer(), + Icon(Icons.arrow_forward_ios, color: Colors.white.withOpacity(0.3),), + ], + ) + ),), + ), + ], + ), ), - ), ); + } } diff --git a/Sources/dafl_project_flutter/lib/views/pages/main/w_settings.dart b/Sources/dafl_project_flutter/lib/views/pages/main/w_settings.dart index 19db674..40f2bc7 100644 --- a/Sources/dafl_project_flutter/lib/views/pages/main/w_settings.dart +++ b/Sources/dafl_project_flutter/lib/views/pages/main/w_settings.dart @@ -30,21 +30,21 @@ class _SettingsWidgetState extends State { crossAxisAlignment: CrossAxisAlignment.center, children: [ Container( - margin: EdgeInsets.fromLTRB(30, height*0.07, 30, 0), - width: double.infinity, - height: 30, - alignment: Alignment.centerLeft, - decoration: BoxDecoration( - color: Color(0xFFD9D9D9).withOpacity(0.16), - borderRadius: BorderRadius.circular(7.0), - ), - child: Padding( - padding: EdgeInsets.fromLTRB(20, 0, 0, 0), - child: Text('Pseudo', - style: TextStyle( - color: Color(0xFFAEAEAE) - ),), - ) + margin: EdgeInsets.fromLTRB(30, height*0.07, 30, 0), + width: double.infinity, + height: 30, + alignment: Alignment.centerLeft, + decoration: BoxDecoration( + color: Color(0xFFD9D9D9).withOpacity(0.16), + borderRadius: BorderRadius.circular(7.0), + ), + child: Padding( + padding: EdgeInsets.fromLTRB(20, 0, 0, 0), + child: Text('Pseudo', + style: TextStyle( + color: Color(0xFFAEAEAE) + ),), + ) ), Padding(padding: EdgeInsets.fromLTRB(30, 0, 30, 0), child: SizedBox( @@ -68,8 +68,8 @@ class _SettingsWidgetState extends State { ), Spacer(), Padding(padding: EdgeInsets.fromLTRB(0, 0, 20, 0), - child: Text('modifier', - style: TextStyle( color: Colors.blue, fontSize: 17),),), + child: Text('modifier', + style: TextStyle( color: Colors.blue, fontSize: 17),),), ], ), @@ -129,3 +129,4 @@ class _SettingsWidgetState extends State { ); } } + diff --git a/Sources/dafl_project_flutter/lib/views/pages/main/w_spot.dart b/Sources/dafl_project_flutter/lib/views/pages/main/w_spot.dart index bca1061..9196b43 100644 --- a/Sources/dafl_project_flutter/lib/views/pages/main/w_spot.dart +++ b/Sources/dafl_project_flutter/lib/views/pages/main/w_spot.dart @@ -26,33 +26,30 @@ class _SpotsWidgetState extends State { double height = MediaQuery.of(context).size.height; double width = MediaQuery.of(context).size.width; final provider = Provider.of(context); - return Scaffold( - - resizeToAvoidBottomInset: false, - backgroundColor: Color(0xFF141414), - body: Container( - height: double.maxFinite, - child: Stack( - children: [ - Transform.scale(scale: 1.1, - child: Container( - decoration: BoxDecoration( - image: DecorationImage( - image: NetworkImage(provider.urlImages.isEmpty != true - ?provider.urlImages.last - :"https://i.imgur.com/Uovh293.png"), - fit: BoxFit.cover, + return Container( - ), - ), - child: BackdropFilter(filter: ImageFilter.blur(sigmaX: 20.0, sigmaY: 20.0), + color: Color(0xFF141414), + child: Container( + height: double.maxFinite, + child: Stack( + children: [ + Transform.scale(scale: 1.1, child: Container( - decoration: BoxDecoration(color: Colors.black.withOpacity(0.4)), + decoration: BoxDecoration( + image: DecorationImage( + image: NetworkImage(provider.urlImages.isEmpty != true + ?provider.urlImages.last + :"https://i.imgur.com/Uovh293.png"), + fit: BoxFit.cover, + + ), + ), + child: BackdropFilter(filter: ImageFilter.blur(sigmaX: 20.0, sigmaY: 20.0), + child: Container( + decoration: BoxDecoration(color: Colors.black.withOpacity(0.4)), + ),), ),), - ),), - Padding( - padding: EdgeInsets.fromLTRB(0, 0, 0,height*0.03), - child: Align( + Align( alignment: FractionalOffset.bottomCenter, child: OpenContainer( @@ -67,68 +64,67 @@ class _SpotsWidgetState extends State { }, ), ), - ), - Center( - child: Container( - width: 300, - height: 300, - child: RiveAnimation.asset('assets/images/search_spot_animation.riv'), + Center( + child: Container( + width: 300, + height: 300, + child: RiveAnimation.asset('assets/images/search_spot_animation.riv'), + ), ), - ), - Positioned( - top: height*0.68, - width: width, - child: Row( - mainAxisAlignment: MainAxisAlignment.center, - children: [ - GestureDetector( - onTap: () { - final provider = Provider.of(context, listen: false); - provider.dislike(); - - }, - child: Image.asset( - 'assets/images/bouton_dislike.png', - height: 70, - width: 70, - fit: BoxFit.cover, + Positioned( + top: height*0.68, + width: width, + child: Row( + mainAxisAlignment: MainAxisAlignment.center, + children: [ + GestureDetector( + onTap: () { + final provider = Provider.of(context, listen: false); + provider.dislike(); + + }, + child: Image.asset( + 'assets/images/bouton_dislike.png', + height: 70, + width: 70, + fit: BoxFit.cover, + ), ), - ), - SizedBox( - width: width*0.1, - ), - GestureDetector( - onTap: () { - final provider = Provider.of(context, listen: false); - provider.discovery(); - }, - child: Image.asset( - 'assets/images/bouton_discovery.png', - height: 70, - width: 70, - fit: BoxFit.cover, + SizedBox( + width: width*0.1, ), - ), - SizedBox( - width: width*0.1, - ), - GestureDetector( - onTap: () { - final provider = Provider.of(context, listen: false); - provider.like(); - }, - child: Image.asset( - 'assets/images/bouton_like.png', - height: 70, - width: 70, - fit: BoxFit.cover, + GestureDetector( + onTap: () { + final provider = Provider.of(context, listen: false); + provider.discovery(); + }, + child: Image.asset( + 'assets/images/bouton_discovery.png', + height: 70, + width: 70, + fit: BoxFit.cover, + ), ), - ), - ], + SizedBox( + width: width*0.1, + ), + GestureDetector( + onTap: () { + final provider = Provider.of(context, listen: false); + provider.like(); + }, + child: Image.asset( + 'assets/images/bouton_like.png', + height: 70, + width: 70, + fit: BoxFit.cover, + ), + ), + ], + ), ), - ), - Align( - child:Container( + Align( + child:Container( width: 400, height: height*0.8, margin: EdgeInsets.fromLTRB(width*0.09,height/5,width*0.09,height/3.7), @@ -136,28 +132,28 @@ class _SpotsWidgetState extends State { child: Container( child: buildCards(), ) - ) , - ), - IgnorePointer(child: Container(height: 200, - decoration: BoxDecoration( - gradient: gradiant.LinearGradient( - colors: [Colors.black, Colors.transparent], - begin: Alignment.topCenter, - end: Alignment.bottomCenter, - ) - - ),),), - Padding(padding: EdgeInsets.fromLTRB(20, 60, 0, 0), - child: Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Text('COULEURS',style: TextStyle(fontFamily: 'DMSans', color: Colors.white.withOpacity(1) ,fontSize: 20, fontWeight: FontWeight.w800),), - Text('Khali',style: TextStyle(fontFamily: 'DMSans', color: Colors.white.withOpacity(1) ,fontSize: 17, fontWeight: FontWeight.w200),), - ], - ),), - ], - ), - ) + ) , + ), + IgnorePointer(child: Container(height: 200, + decoration: BoxDecoration( + gradient: gradiant.LinearGradient( + colors: [Colors.black, Colors.transparent], + begin: Alignment.topCenter, + end: Alignment.bottomCenter, + ) + + ),),), + Padding(padding: EdgeInsets.fromLTRB(20, 60, 0, 0), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Text('COULEURS',style: TextStyle(fontFamily: 'DMSans', color: Colors.white.withOpacity(1) ,fontSize: 20, fontWeight: FontWeight.w800),), + Text('Khali',style: TextStyle(fontFamily: 'DMSans', color: Colors.white.withOpacity(1) ,fontSize: 17, fontWeight: FontWeight.w200),), + ], + ),), + ], + ), + ) ); } @@ -168,8 +164,8 @@ class _SpotsWidgetState extends State { return Stack( children: urlImages .map((urlImage) => CardWidget( - urlImage: urlImage, - isFront: urlImages.last == urlImage, + urlImage: urlImage, + isFront: urlImages.last == urlImage, )) .toList(), ); @@ -192,61 +188,61 @@ class DisplayInfoWidget extends StatelessWidget{ body: ListView( children: [ Container( - margin: EdgeInsets.fromLTRB(30, 10, 30, 0), - child: Column( - children: [ - Text('Pour mon mariage',style: TextStyle(fontFamily: 'DMSans', color: Colors.white.withOpacity(1) ,fontSize: 20, fontWeight: FontWeight.w800),), + margin: EdgeInsets.fromLTRB(30, 10, 30, 0), + child: Column( + children: [ + Text('Pour mon mariage',style: TextStyle(fontFamily: 'DMSans', color: Colors.white.withOpacity(1) ,fontSize: 20, fontWeight: FontWeight.w800),), - Container( - margin: EdgeInsets.fromLTRB(0, 10, 0, 0), - decoration: BoxDecoration( - color: Color(0xFF2E2C2E), - border: Border.all(width: 1, color: Colors.grey.withOpacity(0.05)), - borderRadius: BorderRadius.all(Radius.circular(20)), - boxShadow: [ - BoxShadow( - color: Colors.black.withOpacity(0.2), - blurRadius: 5, - spreadRadius: 1, - offset: Offset(2.0, 2.0), // shadow direction: bottom right - ) - ], + Container( + margin: EdgeInsets.fromLTRB(0, 10, 0, 0), + decoration: BoxDecoration( + color: Color(0xFF2E2C2E), + border: Border.all(width: 1, color: Colors.grey.withOpacity(0.05)), + borderRadius: BorderRadius.all(Radius.circular(20)), + boxShadow: [ + BoxShadow( + color: Colors.black.withOpacity(0.2), + blurRadius: 5, + spreadRadius: 1, + offset: Offset(2.0, 2.0), // shadow direction: bottom right + ) + ], - ), - width: double.infinity, - height: 100, - child: Padding(padding: EdgeInsets.fromLTRB(10, 10, 10, 10),child: Row( - children: [ - Container( - height: 75, - width: 75, - decoration: BoxDecoration( - image: DecorationImage( - image: AssetImage("assets/images/dadju-cover-poison.png"), - fit: BoxFit.cover, - ), - border: Border.all(width: 0, color: Colors.grey.withOpacity(0)), - borderRadius: BorderRadius.all(Radius.circular(15)), - ),), - SizedBox( ), - Container( - margin: EdgeInsets.fromLTRB(20, 0, 0, 0), - child: Column( - crossAxisAlignment: CrossAxisAlignment.start, - mainAxisAlignment: MainAxisAlignment.center, - children: [ - Text('Ma vie',style: TextStyle(fontFamily: 'DMSans', color: Colors.white.withOpacity(1) ,fontSize: 20, fontWeight: FontWeight.w800),), - Text('Dadju',style: TextStyle(fontFamily: 'DMSans', color: Colors.white.withOpacity(0.6) ,fontSize: 16, fontWeight: FontWeight.w400),), - - ], - ),), - ], - ),), - ), + width: double.infinity, + height: 100, + child: Padding(padding: EdgeInsets.fromLTRB(10, 10, 10, 10),child: Row( + children: [ + Container( + height: 75, + width: 75, + decoration: BoxDecoration( + image: DecorationImage( + image: AssetImage("assets/images/dadju-cover-poison.png"), + fit: BoxFit.cover, + ), + border: Border.all(width: 0, color: Colors.grey.withOpacity(0)), + borderRadius: BorderRadius.all(Radius.circular(15)), + ),), + SizedBox( + ), + Container( + margin: EdgeInsets.fromLTRB(20, 0, 0, 0), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + mainAxisAlignment: MainAxisAlignment.center, + children: [ + Text('Ma vie',style: TextStyle(fontFamily: 'DMSans', color: Colors.white.withOpacity(1) ,fontSize: 20, fontWeight: FontWeight.w800),), + Text('Dadju',style: TextStyle(fontFamily: 'DMSans', color: Colors.white.withOpacity(0.6) ,fontSize: 16, fontWeight: FontWeight.w400),), - ], - ) + ], + ),), + ], + ),), + ), + + ], + ) ), Container( margin: EdgeInsets.fromLTRB(30, 10, 30, 0), @@ -666,13 +662,16 @@ class PreviewInfoWidget extends StatelessWidget{ decoration: BoxDecoration( color: Color(0xFF24243A).withOpacity(0.40), border: Border.all(width: 0, color: Colors.grey.withOpacity(0)), - borderRadius: BorderRadius.all(Radius.circular(15)), + borderRadius: BorderRadius.only( + topLeft: Radius.circular(20), + topRight: Radius.circular(20), + ), ), child: Row( mainAxisAlignment: MainAxisAlignment.center, - children: [ - Text('Me découvrir...',style: TextStyle(fontFamily: 'DMSans', color: Colors.white.withOpacity(1) ,fontSize: 17, fontWeight: FontWeight.w800),), - ], + children: [ + Text('Me découvrir...',style: TextStyle(fontFamily: 'DMSans', color: Colors.white.withOpacity(1) ,fontSize: 17, fontWeight: FontWeight.w800),), + ], ), );