commit
continuous-integration/drone/push Build is passing Details

messagerie_lucas_test
Lucas DELANIER 2 years ago
parent 7763284364
commit e332d84deb

@ -198,6 +198,13 @@
</list> </list>
</value> </value>
</entry> </entry>
<entry key="home_indicator">
<value>
<list>
<option value="$USER_HOME$/flutter/.pub-cache/hosted/pub.dartlang.org/home_indicator-2.0.2/lib" />
</list>
</value>
</entry>
<entry key="html"> <entry key="html">
<value> <value>
<list> <list>
@ -541,6 +548,7 @@
<root url="file://$USER_HOME$/flutter/.pub-cache/hosted/pub.dartlang.org/fluttertoast-8.1.1/lib" /> <root url="file://$USER_HOME$/flutter/.pub-cache/hosted/pub.dartlang.org/fluttertoast-8.1.1/lib" />
<root url="file://$USER_HOME$/flutter/.pub-cache/hosted/pub.dartlang.org/font_awesome_flutter-10.2.1/lib" /> <root url="file://$USER_HOME$/flutter/.pub-cache/hosted/pub.dartlang.org/font_awesome_flutter-10.2.1/lib" />
<root url="file://$USER_HOME$/flutter/.pub-cache/hosted/pub.dartlang.org/graphs-2.1.0/lib" /> <root url="file://$USER_HOME$/flutter/.pub-cache/hosted/pub.dartlang.org/graphs-2.1.0/lib" />
<root url="file://$USER_HOME$/flutter/.pub-cache/hosted/pub.dartlang.org/home_indicator-2.0.2/lib" />
<root url="file://$USER_HOME$/flutter/.pub-cache/hosted/pub.dartlang.org/html-0.15.1/lib" /> <root url="file://$USER_HOME$/flutter/.pub-cache/hosted/pub.dartlang.org/html-0.15.1/lib" />
<root url="file://$USER_HOME$/flutter/.pub-cache/hosted/pub.dartlang.org/http-0.13.5/lib" /> <root url="file://$USER_HOME$/flutter/.pub-cache/hosted/pub.dartlang.org/http-0.13.5/lib" />
<root url="file://$USER_HOME$/flutter/.pub-cache/hosted/pub.dartlang.org/http_parser-4.0.2/lib" /> <root url="file://$USER_HOME$/flutter/.pub-cache/hosted/pub.dartlang.org/http_parser-4.0.2/lib" />

@ -5,6 +5,8 @@ PODS:
- fluttertoast (0.0.2): - fluttertoast (0.0.2):
- Flutter - Flutter
- Toast - Toast
- home_indicator (0.0.1):
- Flutter
- path_provider_ios (0.0.1): - path_provider_ios (0.0.1):
- Flutter - Flutter
- Toast (4.0.0) - Toast (4.0.0)
@ -15,6 +17,7 @@ DEPENDENCIES:
- Flutter (from `Flutter`) - Flutter (from `Flutter`)
- flutter_native_splash (from `.symlinks/plugins/flutter_native_splash/ios`) - flutter_native_splash (from `.symlinks/plugins/flutter_native_splash/ios`)
- fluttertoast (from `.symlinks/plugins/fluttertoast/ios`) - fluttertoast (from `.symlinks/plugins/fluttertoast/ios`)
- home_indicator (from `.symlinks/plugins/home_indicator/ios`)
- path_provider_ios (from `.symlinks/plugins/path_provider_ios/ios`) - path_provider_ios (from `.symlinks/plugins/path_provider_ios/ios`)
- vibration (from `.symlinks/plugins/vibration/ios`) - vibration (from `.symlinks/plugins/vibration/ios`)
@ -29,6 +32,8 @@ EXTERNAL SOURCES:
:path: ".symlinks/plugins/flutter_native_splash/ios" :path: ".symlinks/plugins/flutter_native_splash/ios"
fluttertoast: fluttertoast:
:path: ".symlinks/plugins/fluttertoast/ios" :path: ".symlinks/plugins/fluttertoast/ios"
home_indicator:
:path: ".symlinks/plugins/home_indicator/ios"
path_provider_ios: path_provider_ios:
:path: ".symlinks/plugins/path_provider_ios/ios" :path: ".symlinks/plugins/path_provider_ios/ios"
vibration: vibration:
@ -38,6 +43,7 @@ SPEC CHECKSUMS:
Flutter: f04841e97a9d0b0a8025694d0796dd46242b2854 Flutter: f04841e97a9d0b0a8025694d0796dd46242b2854
flutter_native_splash: 52501b97d1c0a5f898d687f1646226c1f93c56ef flutter_native_splash: 52501b97d1c0a5f898d687f1646226c1f93c56ef
fluttertoast: 74526702fea2c060ea55dde75895b7e1bde1c86b fluttertoast: 74526702fea2c060ea55dde75895b7e1bde1c86b
home_indicator: 60c6a4b60d17173cd164c112eb9be37055b23af8
path_provider_ios: 14f3d2fd28c4fdb42f44e0f751d12861c43cee02 path_provider_ios: 14f3d2fd28c4fdb42f44e0f751d12861c43cee02
Toast: 91b396c56ee72a5790816f40d3a94dd357abc196 Toast: 91b396c56ee72a5790816f40d3a94dd357abc196
vibration: 7d883d141656a1c1a6d8d238616b2042a51a1241 vibration: 7d883d141656a1c1a6d8d238616b2042a51a1241

@ -40,12 +40,12 @@ class Controller{
void changeUsernameCourant(String newName){ void changeUsernameCourant(String newName){
if(newName !=null){ if(newName !=null){
this.currentUser?.usernameDafl = newName; this.currentUser.usernameDafl = newName;
} }
} }
void changePasswordCourant(String newPass){ void changePasswordCourant(String newPass){
if(newPass !=null){ if(newPass !=null){
this.currentUser?.passwDafl = newPass; this.currentUser.passwDafl = newPass;
} }
} }
} }

@ -1,4 +1,5 @@
import 'dart:async'; import 'dart:async';
import 'dart:io';
import 'package:fluttertoast/fluttertoast.dart'; import 'package:fluttertoast/fluttertoast.dart';
import 'package:vibration/vibration.dart'; import 'package:vibration/vibration.dart';
import 'dart:math'; import 'dart:math';
@ -9,6 +10,7 @@ import 'package:flutter/services.dart';
import 'package:provider/provider.dart'; import 'package:provider/provider.dart';
import 'package:rive/rive.dart' as riv; import 'package:rive/rive.dart' as riv;
import '../controller/controller.dart'; import '../controller/controller.dart';
import 'package:home_indicator/home_indicator.dart';
import '../model/music.dart'; import '../model/music.dart';
import 'model/music.dart'; import 'model/music.dart';
import 'model/spot.dart'; import 'model/spot.dart';
@ -22,12 +24,11 @@ void main() {
class MyApp extends StatelessWidget { class MyApp extends StatelessWidget {
Controller controller = Controller(); Controller controller = Controller();
// This widget is the root of your application. // This widget is the root of your application.
@override @override
Widget build(BuildContext context){ Widget build(BuildContext context){
Paint.enableDithering = true; Paint.enableDithering = true;
SystemChrome.setEnabledSystemUIMode(SystemUiMode.immersiveSticky); SystemChrome.setEnabledSystemUIOverlays([SystemUiOverlay.top]);
return ChangeNotifierProvider( return ChangeNotifierProvider(
create: (context) => CardProvider(), create: (context) => CardProvider(),
child: MaterialApp( child: MaterialApp(
@ -159,8 +160,8 @@ class CardProvider extends ChangeNotifier{
_position -= Offset(0, -_screenSize.height); _position -= Offset(0, -_screenSize.height);
_discovery_card(); _discovery_card();
print("discovery"); print("discovery");
if(MyApp().controller.currentUser.Discovery.contains(MyApp().controller.currentUser.Spots2?.last.music)){ if(MyApp().controller.currentUser.Discovery.contains(MyApp().controller.currentUser.Spots2.last.music)){
MyApp().controller.currentUser.Discovery.remove(MyApp().controller.currentUser.Spots2?.last.music); MyApp().controller.currentUser.Discovery.remove(MyApp().controller.currentUser.Spots2.last.music);
Fluttertoast.showToast( Fluttertoast.showToast(
msg: 'Supprimer', msg: 'Supprimer',
toastLength: Toast.LENGTH_SHORT, toastLength: Toast.LENGTH_SHORT,
@ -203,14 +204,17 @@ class CardProvider extends ChangeNotifier{
maxWidth: 600, maxWidth: 600,
maxHeight: double.infinity, maxHeight: double.infinity,
), ),
builder: (context) => buildSheet(),); builder: (context) => buildSheet(context),);
notifyListeners(); notifyListeners();
} }
Widget buildSheet(){ Widget buildSheet(context){
final messageTextField = TextEditingController(); final messageTextField = TextEditingController();
return Container( return SingleChildScrollView(
height: 550, padding:
width: 350, EdgeInsets.only(bottom: MediaQuery.of(context).viewInsets.bottom),
child: Container(
height: 500,
width: 380,
decoration: BoxDecoration( decoration: BoxDecoration(
boxShadow: [ boxShadow: [
BoxShadow( BoxShadow(
@ -259,6 +263,7 @@ class CardProvider extends ChangeNotifier{
child: Padding( child: Padding(
padding: EdgeInsets.all(20), padding: EdgeInsets.all(20),
child: TextField( child: TextField(
keyboardAppearance: Brightness.dark,
controller: messageTextField, controller: messageTextField,
maxLength: 300, maxLength: 300,
style: TextStyle(fontFamily: 'DMSans', color: Colors.white.withOpacity(1) ,fontSize: 17, fontWeight: FontWeight.w200), style: TextStyle(fontFamily: 'DMSans', color: Colors.white.withOpacity(1) ,fontSize: 17, fontWeight: FontWeight.w200),
@ -306,6 +311,7 @@ class CardProvider extends ChangeNotifier{
), ),
), ),
),
); );

@ -43,11 +43,11 @@ class User{
Map<User,Conversation> conversations={}; Map<User,Conversation> conversations={};
void addDiscovery(Music newmusic){ void addDiscovery(Music newmusic){
if(MyApp().controller?.currentUser?.Discovery == null){ if(MyApp().controller.currentUser.Discovery == null){
} }
else{ else{
MyApp().controller.currentUser?.Discovery.add(newmusic); MyApp().controller.currentUser.Discovery.add(newmusic);
} }

@ -54,7 +54,7 @@ class _HomePageState extends State<HomePage> {
); );
}, },
child: Text("SINSCRIRE MAINTENANT", child: Text("SINSCRIRE MAINTENANT",
style: TextStyle(color: Colors.white ,fontSize: 17, fontWeight: FontWeight.bold), style: TextStyle(color: Colors.white ,fontSize: 17, fontWeight: FontWeight.bold,fontFamily: "DMSans"),
textAlign: TextAlign.center, textAlign: TextAlign.center,
), ),
),), ),),
@ -74,7 +74,7 @@ class _HomePageState extends State<HomePage> {
child: Align( child: Align(
alignment: Alignment.center, alignment: Alignment.center,
child: Text("SE CONNECTER", child: Text("SE CONNECTER",
style: TextStyle(color: Colors.white ,fontSize: 17, fontWeight: FontWeight.bold), style: TextStyle(color: Colors.white ,fontFamily: "DMSans",fontSize: 17, fontWeight: FontWeight.bold),
textAlign: TextAlign.center, textAlign: TextAlign.center,
), ),
), ),

@ -164,14 +164,7 @@ class _ConversationPageState extends State<ConversationPage> {
color: Color(0xFF141414), color: Color(0xFF141414),
height: height*0.92, height: height*0.92,
width: double.infinity, width: double.infinity,
child: /*ListView( child: ListView.builder(
reverse: true,
scrollDirection: Axis.vertical,
children: [
messages;
],
),*/
ListView.builder(
controller: listScrollController, controller: listScrollController,
physics: BouncingScrollPhysics(), physics: BouncingScrollPhysics(),
itemCount: messages.length, itemCount: messages.length,
@ -269,8 +262,11 @@ class _ConversationPageState extends State<ConversationPage> {
Widget buildSheet(){ Widget buildSheet(){
String dropdownValue = list.first; String dropdownValue = list.first;
final messageTextField = TextEditingController(); final messageTextField = TextEditingController();
return Container( return SingleChildScrollView(
height: 550, padding:
EdgeInsets.only(bottom: MediaQuery.of(context).viewInsets.bottom),
child:Container(
height: 500,
width: double.infinity, width: double.infinity,
decoration: BoxDecoration( decoration: BoxDecoration(
boxShadow: [ boxShadow: [
@ -337,6 +333,9 @@ class _ConversationPageState extends State<ConversationPage> {
borderRadius: BorderRadius.circular(15), borderRadius: BorderRadius.circular(15),
), ),
child: TextField( child: TextField(
keyboardAppearance: Brightness.dark,
onTap: (){
},
style: TextStyle(fontFamily: 'DMSans', color: Colors.white.withOpacity(1) ,fontSize: 17, fontWeight: FontWeight.w200), style: TextStyle(fontFamily: 'DMSans', color: Colors.white.withOpacity(1) ,fontSize: 17, fontWeight: FontWeight.w200),
maxLines: 3, maxLines: 3,
textInputAction: TextInputAction.done, textInputAction: TextInputAction.done,
@ -368,11 +367,13 @@ class _ConversationPageState extends State<ConversationPage> {
borderRadius: BorderRadius.circular(17) borderRadius: BorderRadius.circular(17)
), ),
), ),
child: Row( child: Stack(
crossAxisAlignment: CrossAxisAlignment.center,
mainAxisAlignment: MainAxisAlignment.center,
children: [ children: [
Text("Envoyer le signalement"), Positioned(
top: -10,
right: 0,
child: Icon(Icons.report,size: 100,color: Colors.white.withOpacity(0.2),)),
Center(child: Text("Envoyer le signalement"),),
], ],
), ),
), ),
@ -381,7 +382,7 @@ class _ConversationPageState extends State<ConversationPage> {
), ),
), ),
); ) ,);
} }
} }

@ -41,11 +41,11 @@ class _MainPageState extends State<MainPage> {
), ),
child: ConstrainedBox( child: ConstrainedBox(
constraints: BoxConstraints( constraints: BoxConstraints(
minHeight: height*0.1, minHeight: 100,
maxHeight: 100, maxHeight: 100,
), ),
child: NavigationBar( child: NavigationBar(
animationDuration: Duration(seconds: 1), animationDuration: Duration(microseconds: 800),
selectedIndex: index, selectedIndex: index,
height: height*0.1, height: height*0.1,
onDestinationSelected: (index) => onDestinationSelected: (index) =>

@ -79,9 +79,9 @@ class _DiscoveryListState extends State<DiscoveryList> {
} }
Widget build(BuildContext context) { Widget build(BuildContext context) {
return RefreshIndicator(child: ListView.builder( return RefreshIndicator(child: ListView.builder(
itemCount: MyApp().controller.currentUser.Discovery.length ?? 0, itemCount: MyApp().controller.currentUser.Discovery.length,
itemBuilder: (context, index){ itemBuilder: (context, index){
int itemCount = MyApp().controller.currentUser.Discovery.length ?? 0; int itemCount = MyApp().controller.currentUser.Discovery.length;
int reversedIndex = itemCount - 1 - index; int reversedIndex = itemCount - 1 - index;
return Dismissible( return Dismissible(
key: Key(MyApp().controller.currentUser.Discovery[reversedIndex].name), key: Key(MyApp().controller.currentUser.Discovery[reversedIndex].name),
@ -113,8 +113,8 @@ class _DiscoveryListState extends State<DiscoveryList> {
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
mainAxisAlignment: MainAxisAlignment.center, mainAxisAlignment: MainAxisAlignment.center,
children: [ children: [
Text(MyApp().controller.currentUser?.Discovery[reversedIndex].name ?? '',style: TextStyle(fontFamily: 'DMSans', color: Colors.white.withOpacity(1) ,fontSize: 20, fontWeight: FontWeight.w800),), Text(MyApp().controller.currentUser.Discovery[reversedIndex].name,style: TextStyle(fontFamily: 'DMSans', color: Colors.white.withOpacity(1) ,fontSize: 20, fontWeight: FontWeight.w800),),
Text(MyApp().controller.currentUser?.Discovery[reversedIndex].artist ?? '',style: TextStyle(fontFamily: 'DMSans', color: Colors.white.withOpacity(0.6) ,fontSize: 16, fontWeight: FontWeight.w400),), Text(MyApp().controller.currentUser.Discovery[reversedIndex].artist,style: TextStyle(fontFamily: 'DMSans', color: Colors.white.withOpacity(0.6) ,fontSize: 16, fontWeight: FontWeight.w400),),
], ],
),), ),),
@ -128,7 +128,7 @@ class _DiscoveryListState extends State<DiscoveryList> {
), onDismissed: (direction) { ), onDismissed: (direction) {
if(direction == DismissDirection.startToEnd) if(direction == DismissDirection.startToEnd)
MyApp().controller.currentUser?.Discovery.removeAt(reversedIndex); MyApp().controller.currentUser.Discovery.removeAt(reversedIndex);
}, },
background: Container(decoration: BoxDecoration( background: Container(decoration: BoxDecoration(
image: DecorationImage(image: AssetImage("assets/images/delete_background.png"), fit: BoxFit.cover), image: DecorationImage(image: AssetImage("assets/images/delete_background.png"), fit: BoxFit.cover),

@ -56,7 +56,7 @@ class _MainPageProfilState extends State<MainPageProfil> {
margin: EdgeInsets.fromLTRB(30, 50, 0, 0), margin: EdgeInsets.fromLTRB(30, 50, 0, 0),
child: Text( child: Text(
"Profil", "Profil",
style: TextStyle(fontSize: 25, fontWeight: FontWeight.w600, color: Colors.white),), style: TextStyle(fontSize: 25, fontWeight: FontWeight.w600, color: Colors.white, fontFamily: "DMSans"),),
), ),
Container( Container(
margin: EdgeInsets.fromLTRB(0, 10, 0, 10), margin: EdgeInsets.fromLTRB(0, 10, 0, 10),
@ -76,7 +76,7 @@ class _MainPageProfilState extends State<MainPageProfil> {
), ),
child: Center( child: Center(
child: Text(username![0] ?? '', child: Text(username![0],
style: TextStyle(color: Colors.white ,fontSize: 60, fontWeight: FontWeight.w500), style: TextStyle(color: Colors.white ,fontSize: 60, fontWeight: FontWeight.w500),
textAlign: TextAlign.center, textAlign: TextAlign.center,
), ),

@ -10,8 +10,8 @@ class SettingsWidget extends StatefulWidget {
} }
class _SettingsWidgetState extends State<SettingsWidget> { class _SettingsWidgetState extends State<SettingsWidget> {
final userNameTextField = TextEditingController(text: MyApp().controller.currentUser?.usernameDafl); final userNameTextField = TextEditingController(text: MyApp().controller.currentUser.usernameDafl);
final passwordTextField = TextEditingController(text: MyApp().controller.currentUser?.passwDafl); final passwordTextField = TextEditingController(text: MyApp().controller.currentUser.passwDafl);
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
double height = MediaQuery.of(context).size.height; double height = MediaQuery.of(context).size.height;
@ -58,6 +58,7 @@ class _SettingsWidgetState extends State<SettingsWidget> {
SizedBox( SizedBox(
width: 230, width: 230,
child: TextField( child: TextField(
keyboardAppearance: Brightness.dark,
controller: userNameTextField, controller: userNameTextField,
style: TextStyle(color: Colors.white), style: TextStyle(color: Colors.white),
decoration: InputDecoration( decoration: InputDecoration(
@ -111,6 +112,7 @@ class _SettingsWidgetState extends State<SettingsWidget> {
SizedBox( SizedBox(
width: 230, width: 230,
child: TextField( child: TextField(
keyboardAppearance: Brightness.dark,
controller: passwordTextField, controller: passwordTextField,
obscureText: true, obscureText: true,
style: TextStyle(color: Colors.white), style: TextStyle(color: Colors.white),

@ -74,6 +74,7 @@ class _SignInPageState extends State<SignInPage> {
), ),
Padding(padding: EdgeInsets.fromLTRB(50, 0, 20, 0), Padding(padding: EdgeInsets.fromLTRB(50, 0, 20, 0),
child: TextField( child: TextField(
keyboardAppearance: Brightness.dark,
controller: userNameTextField, controller: userNameTextField,
decoration: InputDecoration( decoration: InputDecoration(
border: InputBorder.none, border: InputBorder.none,
@ -118,6 +119,7 @@ class _SignInPageState extends State<SignInPage> {
),Padding(padding: EdgeInsets.fromLTRB(50, 0, 20, 0), ),Padding(padding: EdgeInsets.fromLTRB(50, 0, 20, 0),
child: TextField( child: TextField(
keyboardAppearance: Brightness.dark,
controller: passwordTextField, controller: passwordTextField,
obscureText: true, obscureText: true,
decoration: InputDecoration( decoration: InputDecoration(

@ -75,6 +75,7 @@ class _SignUpPageState extends State<SignUpPage> {
), ),
Padding(padding: EdgeInsets.fromLTRB(50, 0, 20, 0), Padding(padding: EdgeInsets.fromLTRB(50, 0, 20, 0),
child: TextField( child: TextField(
keyboardAppearance: Brightness.dark,
controller: userNameTextField, controller: userNameTextField,
decoration: InputDecoration( decoration: InputDecoration(
border: InputBorder.none, border: InputBorder.none,
@ -119,6 +120,7 @@ class _SignUpPageState extends State<SignUpPage> {
),Padding(padding: EdgeInsets.fromLTRB(50, 0, 20, 0), ),Padding(padding: EdgeInsets.fromLTRB(50, 0, 20, 0),
child: TextField( child: TextField(
keyboardAppearance: Brightness.dark,
controller: passwordTextField, controller: passwordTextField,
obscureText: true, obscureText: true,
decoration: InputDecoration( decoration: InputDecoration(

@ -191,6 +191,13 @@ packages:
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "2.1.0" version: "2.1.0"
home_indicator:
dependency: "direct main"
description:
name: home_indicator
url: "https://pub.dartlang.org"
source: hosted
version: "2.0.2"
html: html:
dependency: transitive dependency: transitive
description: description:

@ -46,6 +46,7 @@ dependencies:
postgresql2: ^1.0.3 postgresql2: ^1.0.3
path_provider: ^2.0.11 path_provider: ^2.0.11
font_awesome_flutter: ^10.2.1 font_awesome_flutter: ^10.2.1
home_indicator: ^2.0.2
dev_dependencies: dev_dependencies:
flutter_test: flutter_test:

Loading…
Cancel
Save