Merge branch 'DataForPHP' into LinkDataPhpFlutter

# Conflicts:
#	.idea/libraries/Dart_Packages.xml
#	.idea/libraries/Dart_SDK.xml
#	Sources/dafl_project_flutter/lib/main.dart
#	Sources/dafl_project_flutter/macos/Flutter/GeneratedPluginRegistrant.swift
#	Sources/dafl_project_flutter/pubspec.lock
#	Sources/dafl_project_flutter/pubspec.yaml
#	Sources/dafl_project_flutter/windows/flutter/generated_plugin_registrant.cc
#	Sources/dafl_project_flutter/windows/flutter/generated_plugins.cmake
messagerie_lucas_test
Dorian HODIN 3 years ago
commit d38bc526c4

@ -2,9 +2,54 @@ kind: pipeline
type: docker
name: DAFLPipeline
trigger:
event:
- push
steps:
# build CONTAINER for app-build on cirrusci IMAGE
- name: app-build
image: cirrusci/flutter:stable
commands:
- flutter doctor
- flutter build
- cd ./Sources/dafl_project_flutter/
- flutter build apk
# build CONTAINER for sonar on cirrusci IMAGE
- name: code-analysis
image: cirrusci/flutter:stable
environment:
SONAR_TOKEN:
from_secret: sonar_token
settings:
sources: ./Sources/dafl_project_flutter
commands:
- export SONAR_SCANNER_VERSION=4.7.0.2747
- export SONAR_SCANNER_HOME=$HOME/.sonar/sonar-scanner-$SONAR_SCANNER_VERSION-linux
- curl --create-dirs -sSLo $HOME/.sonar/sonar-scanner.zip https://binaries.sonarsource.com/Distribution/sonar-scanner-cli/sonar-scanner-cli-$SONAR_SCANNER_VERSION-linux.zip
- unzip -o $HOME/.sonar/sonar-scanner.zip -d $HOME/.sonar/
- export PATH=$SONAR_SCANNER_HOME/bin:$PATH
- export SONAR_SCANNER_OPTS="-server"
- sonar-scanner -D sonar.projectKey=DAFLMusic -D sonar.sources=. -D sonar.host.url=https://codefirst.iut.uca.fr/sonar
depends_on: [ app-build ]
- name: web-server
image: plugins/docker
settings:
dockerfile: ./Sources/api_redirect/Dockerfile
context: Sources/api_redirect/
registry: hub.codefirst.iut.uca.fr
repo: hub.codefirst.iut.uca.fr/felix.mielcarek/dafl_music
username:
from_secret: secret-registry-username
password:
from_secret: secret-registry-password
- name: deploy-container
image: hub.codefirst.iut.uca.fr/thomas.bellembois/codefirst-dockerproxy-clientdrone:latest
environment:
IMAGENAME: hub.codefirst.iut.uca.fr/felix.mielcarek/dafl_music:latest
CONTAINERNAME: apiredirect
COMMAND: create
OVERWRITE: true
depends_on: [ web-server ]

@ -1,4 +1,54 @@
<p align="center">
<img src="https://codefirst.iut.uca.fr/git/DAFLDev/DAFLMusic/raw/branch/master/Documentation/Images/banner.png" />
</p>
[![Build Status](https://codefirst.iut.uca.fr/api/badges/DAFLDev/DAFLMusic/status.svg)](https://codefirst.iut.uca.fr/DAFLDev/DAFLMusic)
[![Bugs](https://codefirst.iut.uca.fr/sonar/api/project_badges/measure?project=DAFLMusic&metric=bugs&token=d36308dfacfc3cb26e1944ec2441cd9563e0c912)](https://codefirst.iut.uca.fr/sonar/dashboard?id=DAFLMusic)
[![Code Smells](https://codefirst.iut.uca.fr/sonar/api/project_badges/measure?project=DAFLMusic&metric=code_smells&token=d36308dfacfc3cb26e1944ec2441cd9563e0c912)](https://codefirst.iut.uca.fr/sonar/dashboard?id=DAFLMusic)
[![Technical Debt](https://codefirst.iut.uca.fr/sonar/api/project_badges/measure?project=DAFLMusic&metric=sqale_index&token=d36308dfacfc3cb26e1944ec2441cd9563e0c912)](https://codefirst.iut.uca.fr/sonar/dashboard?id=DAFLMusic)
[![Duplicated Lines (%)](https://codefirst.iut.uca.fr/sonar/api/project_badges/measure?project=DAFLMusic&metric=duplicated_lines_density&token=d36308dfacfc3cb26e1944ec2441cd9563e0c912)](https://codefirst.iut.uca.fr/sonar/dashboard?id=DAFLMusic)
[![Lines of Code](https://codefirst.iut.uca.fr/sonar/api/project_badges/measure?project=DAFLMusic&metric=ncloc&token=d36308dfacfc3cb26e1944ec2441cd9563e0c912)](https://codefirst.iut.uca.fr/sonar/dashboard?id=DAFLMusic)
[![Security Rating](https://codefirst.iut.uca.fr/sonar/api/project_badges/measure?project=DAFLMusic&metric=security_rating&token=d36308dfacfc3cb26e1944ec2441cd9563e0c912)](https://codefirst.iut.uca.fr/sonar/dashboard?id=DAFLMusic)
[![Vulnerabilities](https://codefirst.iut.uca.fr/sonar/api/project_badges/measure?project=DAFLMusic&metric=vulnerabilities&token=d36308dfacfc3cb26e1944ec2441cd9563e0c912)](https://codefirst.iut.uca.fr/sonar/dashboard?id=DAFLMusic)
# <div align="center">Le contexte du projet</div>
Ce projet est un travail universitaire pour la deuxième année du B.U.T Informatique de Clermont-Ferrand. Il correspond au travail demandé pour la SAE 3.01, nous disposons de 480 heures théoriques pour le réaliser.
<br>
# <div align="center">L'application</div>
![Flutter](https://img.shields.io/badge/Flutter-%2302569B.svg?style=for-the-badge&logo=Flutter&logoColor=white)
* Notre projet est un réseau social destiné aux appareils mobiles Android
et iOS focalisé sur la musique.
* Chaque utilisateur voit défiler les profils des autres personnes utilisant
notre application et se trouvant dans un périmètre restreint (environ une
cinquantaine de mètres).
* Un profil peut être "liké" et si les deux personnes se "likent" mutuellement, un "match" a alors lieu, et une conversation est créée pour qu'elles puissent entrer en contact. Après un "like", le profil suivant est affiché. Si ce profil ne l'intéresse pas il peut le "passer", et l'application propose un autre profil, etc.
* Pour chaque profil affiché, il est possible d'envoyer un message, ce qui
créera une conversation en attente chez l'autre personne. Elle pourra
ensuite choisir de répondre ou de le supprimer si elle n'est pas intéressée.
* Un profil affiché est anonyme. Seulement la musique écoutée en temps
réel par la personne possédant le compte est renseignée.
* En cliquant sur un bouton, il est aussi possible de voir des informations
complémentaires toujours sur les goûts musicaux du profil. Ces
informations sont remplies préalablement par chaque utilisateur, cela
peut être par exemple : "Quelle est la musique que je passerais à mon
mariage ?".
# DAFLMusic
* Les informations complémentaires de tous les utilisateurs sont aussi
utilisées pour établir des statistiques dans une page à part. Il y sera
indiqué, pour chaque catégorie, quelle est la musique la plus choisie parmi
tous les utilisateurs.
* Si l'utilisateur est consentant, après un "Match", il peut accepter de
révéler quelques informations personnelles (nom, âge, sexe).
Le but est qu'une mise en contact entre 2 personnes se base uniquement
sur des critères musicaux et non personnels.

@ -0,0 +1,2 @@
FROM httpd:2.4
COPY ./public-html/ /usr/local/apache2/htdocs/

@ -0,0 +1,14 @@
[
{
"relation": [
"delegate_permission/common.handle_all_urls"
],
"target": {
"namespace": "android_app",
"package_name": "com.example.dafl_project_flutter",
"sha256_cert_fingerprints": [
"63:51:EF:20:82:10:B9:34:F7:C7:4E:F6:55:D3:41:84:C6:81:30:23:02:50:E9:A3:EB:BB:F7:CF:43:79:A1:6E"
]
}
}
]

@ -1,46 +1 @@
# dafl_project_flutter
*```dafl_project_flutter``` est le nom de notre projet Flutter.*
## Gestion de Git
* Ceci est un **ordre** !
Faire les commit en ligne de commande car Android Studio déclare des erreurs factices dans des fichiers créés pour les plateformes.
1. Ajout de tous les fichiers modifiés / ou créés dans la staging area (fichers locaux prêts à être commit)
```shell
git add -A
```
2. Validation des fichiers destinées à être envoyé sur le repo
```shell
git commit -m "Message corresponding to modifications done in my commmit"
```
*Insérer un message entre les doubles quotes après le ```-m```*
3. Envoi des commit
```shell
git push origin my_branch
```
*Remplacer ```my_branch``` par la branche sur laquelle on a voulu trailler*
## Convention de nommage des répertoires
```
mon_repertoire
```
*Penser à ajouter un ```.gitkeep``` pour que Git conserve le repertoire.*
## Convention de nommage des fichiers
| Contenu du fichier | Convention |
| :- | :- |
| Page de vue | ```p_ma_page.dart``` |
| Page de widget | ```w_mon_widget.dart``` |

@ -0,0 +1,35 @@
import 'package:dafl_project_flutter/persistence/database_loader.dart';
import 'package:dafl_project_flutter/persistence/database_saver.dart';
import 'package:dafl_project_flutter/persistence/loader.dart';
import '../persistence/saver.dart';
import '../persistence/loader.dart';
import '../model/user.dart';
class Controller{
static Controller? _this;
static Saver? saver = DatabaseSaver();
static Loader? loader = DatabaseLoader();
Future<User?>? currentUser;
factory Controller(){
if (_this == null) _this = Controller._();
return _this!;
}
Controller._();
void save(User userToSave){
saver?.save(userToSave);
}
void load(String username, String password) async{
currentUser = loader?.load(username, password);
}
}

@ -1,8 +1,7 @@
import 'dart:async';
import 'package:dafl_project_flutter/views/pages/main/w_bottomsheet.dart';
import 'package:dafl_project_flutter/persistence/database_saver.dart';
import 'package:fluttertoast/fluttertoast.dart';
import 'position/location.dart';
import 'package:vibration/vibration.dart';
import 'package:path_provider/path_provider.dart';
import 'dart:math';
import './views/pages/home/p_home.dart';
import './views/pages/main/p_main.dart';
@ -11,18 +10,22 @@ import 'package:flutter/services.dart';
import 'package:provider/provider.dart';
import 'package:rive/rive.dart';
import 'package:dafl_project_flutter/controller/controller.dart';
void main() {
runApp(MyApp());
MyApp mainApp = MyApp();
runApp(mainApp);
}
class MyApp extends StatelessWidget {
class MyApp extends StatelessWidget {
// This widget is the root of your application.
@override
Widget build(BuildContext context){
Location.sendCurrentLocation();
Location.getData();
SystemChrome.setEnabledSystemUIMode(SystemUiMode.immersiveSticky);
return ChangeNotifierProvider(
create: (context) => CardProvider(),
@ -33,10 +36,9 @@ class MyApp extends StatelessWidget {
),
);
}
}
enum CardStatus { like, disLike, discovery, message}
enum CardStatus { like, disLike, discovery}
class CardProvider extends ChangeNotifier{
List<String> _urlImages = [];
@ -86,7 +88,7 @@ class CardProvider extends ChangeNotifier{
notifyListeners();
}
void endPosition(context) {
void endPosition() {
_isDragging = false;
notifyListeners();
@ -95,7 +97,7 @@ class CardProvider extends ChangeNotifier{
switch (status) {
case CardStatus.like:
like(context);
like();
break;
case CardStatus.disLike:
dislike();
@ -103,9 +105,6 @@ class CardProvider extends ChangeNotifier{
case CardStatus.discovery:
discovery();
break;
case CardStatus.message:
message(context);
break;
default:
resetPosition();
}
@ -129,8 +128,7 @@ class CardProvider extends ChangeNotifier{
CardStatus? getStatus({bool force = false}) {
final x = _position.dx;
final y = _position.dy;
final forceDiscovery = x.abs() < 80;
final forceMessage = x.abs() < 100;
final forceDiscovery = x.abs() < 20;
if(force) {
final delta = 100;
@ -140,16 +138,12 @@ class CardProvider extends ChangeNotifier{
} else if ( x <= -delta){
return CardStatus.disLike;
} else if ( y <= -delta / 2 && forceDiscovery){
return CardStatus.message;
} else if (y >= delta * 2 && x.abs() < 100) {
return CardStatus.discovery;
}
} else{
final delta = 20;
if(y <= -delta * 2 && forceDiscovery) {
return CardStatus.message;
} else if (y >= delta *2 && x.abs() < 80) {
return CardStatus.discovery;
} else if ( x >= delta) {
return CardStatus.like;
@ -159,7 +153,6 @@ class CardProvider extends ChangeNotifier{
}
}
void dislike() {
Vibration.vibrate(duration: 20, amplitude: 60);
print("dislike");
_angle = -20;
_position -= Offset(2 * _screenSize.width, 0);
@ -169,10 +162,9 @@ class CardProvider extends ChangeNotifier{
}
void discovery() {
Vibration.vibrate(duration: 20, amplitude: 60);
print("discovery");
_angle = 0;
_position -= Offset(0, -_screenSize.height);
_position -= Offset(0, _screenSize.height);
_discovery_card();
Fluttertoast.showToast(
msg: 'Ajouté',
@ -186,131 +178,13 @@ class CardProvider extends ChangeNotifier{
notifyListeners();
}
void message(context) {
Vibration.vibrate(duration: 20, amplitude: 60);
print("message");
_angle = 0;
_position -= Offset(0, _screenSize.height);
_message_card();
showModalBottomSheet(
isDismissible: false,
useRootNavigator: true,
isScrollControlled: true,
backgroundColor: Colors.transparent,
context: context,
constraints: BoxConstraints(
maxWidth: 600,
maxHeight: double.infinity,
),
builder: (context) => buildSheet(),);
notifyListeners();
}
Widget buildSheet() => Container(
height: 550,
width: 350,
decoration: BoxDecoration(
boxShadow: [
BoxShadow(
color: Colors.black.withOpacity(0.4),
offset: const Offset(
0,
0,
),
blurRadius: 10.0,
spreadRadius: 2.0,
),
BoxShadow(
color: Colors.white.withOpacity(0.3),
offset: const Offset(0.0, 0.0),
blurRadius: 0.0,
spreadRadius: 0.0,
),//BoxShadow//BoxShadow
],
color: Color(0xFF232123),
borderRadius: BorderRadius.only(
topRight: Radius.circular(30),
topLeft: Radius.circular(30),
),
),
child: Padding(
padding: EdgeInsets.fromLTRB(20, 10, 20, 10),
child: Column(
children: [
Container(
height: 5,
width: 130,
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(20),
color: Color(0xFF8A8A8A),
),
),
SizedBox(height: 30,),
Container(
width: double.infinity,
height: 300,
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(20),
color: Color(0xFF302C30),
),
child: Padding(
padding: EdgeInsets.all(20),
child: TextField(
maxLength: 300,
style: TextStyle(fontFamily: 'DMSans', color: Colors.white.withOpacity(1) ,fontSize: 17, fontWeight: FontWeight.w200),
expands: true,
maxLines: null,
keyboardType: TextInputType.multiline,
decoration: InputDecoration(
hintStyle: TextStyle(
color: Colors.white,
),
border: InputBorder.none,
hintText: "Mon message",
),
),
),
),
SizedBox(height: 20,),
SizedBox(
width: double.infinity,
height: 70,
child: ElevatedButton(
onPressed: () {},
style: ElevatedButton.styleFrom(
primary: Color(0xFF3F1DC3),
textStyle: TextStyle(
fontSize: 20,
fontWeight: FontWeight.bold),
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(17)
),
),
child: Row(
mainAxisAlignment: MainAxisAlignment.end,
children: [
Text("Envoyer"),
Opacity(opacity: 0.2,
child: Image.asset("assets/images/send_logo.png",),)
],
),
),
)
],
),
),
);
void like(context) {
Vibration.vibrate(duration: 20, amplitude: 60);
void like() {
print("like");
_angle = 20;
_position += Offset(2 * _screenSize.width, 0);
_nextCard();
notifyListeners();
notifyListeners();
}
Future _nextCard() async {
@ -325,12 +199,6 @@ class CardProvider extends ChangeNotifier{
await Future.delayed(Duration(milliseconds: 200));
resetPosition();
}
Future _message_card() async {
await Future.delayed(Duration(milliseconds: 200));
resetPosition();
}
}

@ -0,0 +1,21 @@
import 'message.dart';
import 'user.dart';
class Conversation{
User firstUser;
User secondUser;
List<Message> messages=[];
Conversation(this.firstUser,this.secondUser);
void addMessage(User sender,String content){
messages.add(Message(sender, content));
}
void displayMessages(){
print("-----Conversation entre $firstUser et $secondUser-----");
for (var element in messages) {
print(element);
}
}
}

@ -0,0 +1,11 @@
import 'user.dart';
class Message{
User sender;
String content;
Message(this.sender,this.content);
@override
String toString() => "$sender : $content";
}

@ -0,0 +1,46 @@
import 'conversation.dart';
class User{
//attributes from DAFL
int? idDafl;
String? usernameDafl;
String? passwDafl;
//attributes to link with API
String? usernameAPI;
String? passwAPI;
//constructors
User(this.usernameDafl, this.passwDafl);
User.name(this.usernameDafl);
User.fromDatabase(this.idDafl, this.usernameDafl);
//lists
Set<User> likedUsers={};
Map<User,Conversation> conversations={};
void like(User liked){
likedUsers.add(liked);
Conversation? conv = liked.conversations[this];
if(conv==null) {
conversations[liked]= Conversation(this, liked);
} else {
conversations[liked]= conv;
}
}
void chat(User recipient,String content){
Conversation? conv = conversations[recipient];
if(conv != null) conv.addMessage(this, content);
}
void displayConversations(){
conversations.forEach((k,v) => v.displayMessages());
}
@override
String toString() => "$usernameDafl ($idDafl)";
}

@ -0,0 +1,8 @@
import 'user.dart';
class UserCreator{
User? createUser(int id, String username){
}
}

@ -0,0 +1,5 @@
postgres
mdpDaflBd
89.83.54.48
BD-DaflMusic

@ -0,0 +1,46 @@
import 'dart:convert';
import 'dart:io';
import 'package:flutter/services.dart';
import 'package:path_provider/path_provider.dart';
import '../model/user.dart';
import 'package:postgresql2/constants.dart';
import 'package:postgresql2/pool.dart';
import 'package:postgresql2/postgresql.dart';
class DatabaseConnexion{
final String filePath = 'assets/logs.txt';
String? _psqlUser;
String? _psqlPswd;
String? _psqlHost;
String? _psqlDataBase;
Future<void> _loadLogs() async{
try{
final _loadedData = await rootBundle.loadString(filePath);
final _logs = LineSplitter.split(_loadedData).toList();
_psqlUser = _logs[0];
_psqlPswd = _logs[1];
_psqlHost = _logs[2];
_psqlDataBase = _logs[3];
}
catch(e){
throw Exception('Logs file Not Found');
}
}
//Initialise connexion to the database
Future<Connection> initConnexion() async{
await _loadLogs();
var uri = 'postgres://$_psqlUser:$_psqlPswd@$_psqlHost:5442/$_psqlDataBase';
return connect(uri);
}
}

@ -0,0 +1,20 @@
import '../persistence/loader.dart';
import '../model/user.dart';
import 'database_connexion.dart';
class DatabaseLoader extends Loader{
DatabaseConnexion dbConnexion = DatabaseConnexion();
@override
Future<User?> load(String? username, String? password) async {
final connection = await dbConnexion.initConnexion();
connection.query('select * from utilisateur where username = @username AND password = @password',
{'username': username,
'password': password}).toList()
.then((result) {
print(result); });
}
}

@ -0,0 +1,19 @@
import 'dart:io';
import 'database_connexion.dart';
import 'saver.dart';
import '../model/user.dart';
class DatabaseSaver extends Saver{
DatabaseConnexion dbConnexion = DatabaseConnexion();
@override
void save(User userToSave) async{
final connection = await dbConnexion.initConnexion();
connection.execute('insert into utilisateur (username, password) values (@username, @password)',
{ 'id' : '',
'username': userToSave.usernameDafl,
'password' : userToSave.passwDafl}).then((_) {});
}
}

@ -0,0 +1,5 @@
import '../model/user.dart';
abstract class Loader{
Future<User?> load(String? username, String? password);
}

@ -0,0 +1,5 @@
import '../model/user.dart';
abstract class Saver{
void save(User userToSave);
}

@ -0,0 +1,6 @@
import '../model/user.dart';
abstract class Search{
bool searchUser(String? username, String? password);
bool searchUsername(String? username);
}

@ -28,12 +28,30 @@ class _HomePageState extends State<HomePage> {
crossAxisAlignment: CrossAxisAlignment.center,
mainAxisAlignment: MainAxisAlignment.end,
children: [
Spacer(),
Image.asset(
'assets/images/Logo.png',
width: 230,
width: 200,
),
SizedBox(height: height*0.08,),
SizedBox(height: height*0.04,),
SizedBox(
height: 55,
width: width*0.75,
child: ElevatedButton(
style: ElevatedButton.styleFrom(
backgroundColor: Color(0xFF24CF5F),
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(15.0),
),// background// foreground
),
onPressed: () {
},
child: Text("CONTINUER AVEC SPOTIFY",
style: TextStyle(color: Colors.white ,fontSize: 17, fontWeight: FontWeight.bold),
textAlign: TextAlign.center,
),
),),
SizedBox(height: height*0.015,),
SizedBox(
height: 55,
width: width*0.75,
@ -58,7 +76,7 @@ class _HomePageState extends State<HomePage> {
textAlign: TextAlign.center,
),
),),
Spacer(),
SizedBox(height: 220,),
GestureDetector(
onTap: (){
Navigator.of(context).push(
@ -94,6 +112,15 @@ class _HomePageState extends State<HomePage> {
],
),
Align(
alignment: Alignment.topRight,
child: Container(
padding: EdgeInsets.fromLTRB(0, 20, 20, 0),
child: Text("v1.0",
style: TextStyle(fontFamily: 'DMSans', color: Colors.white.withOpacity(0.5) ,fontSize: 17, fontWeight: FontWeight.w700),
),
)
),
],
),

@ -1,150 +0,0 @@
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:fluttericon/font_awesome5_icons.dart';
class ConversationPage extends StatefulWidget {
const ConversationPage({Key? key}) : super(key: key);
@override
State<ConversationPage> createState() => _ConversationPageState();
}
class _ConversationPageState extends State<ConversationPage> {
@override
Widget build(BuildContext context) {
double height = MediaQuery.of(context).size.height;
double width = MediaQuery.of(context).size.width;
return Scaffold(
resizeToAvoidBottomInset: true,
backgroundColor: Color(0xFF141414),
appBar: AppBar(
toolbarHeight: 100,
title: Row(
children: [
Container(
height: 60,
width: 60,
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(40),
color: Colors.blue,
),
),
SizedBox(width: 20,),
Text("Max"),
],
),
backgroundColor: Color(0xFF141414),
elevation: 0,
),
body: SingleChildScrollView(
child: Column(
children: [
Container(
color: Color(0xFF141414),
height: height*0.76,
width: double.infinity,
child: ListView(
scrollDirection: Axis.vertical,
children: [
Message('Adolescebat autem obstinatum propositum erga haec et similia multa scrutanda, stimulos admovente regina, quae abrupte mariti fortunas trudebat in exitium praeceps, cum eum potius lenitate feminea ad veritatis humanitatisque viam reducere utilia suadendo deberet, ut in Gordianorum actibus factitasse Maximini truculenti illius imperatoris rettulimus coniugem.', 0),
Message('Claudiopolis olim Seleucia Caesar potens quidem olim interneciva enim et.', 1),
Message('Quae quae praeceps feminea quae truculenti humanitatisque cum humanitatisque in truculenti abrupte imperatoris mariti regina regina ad lenitate veritatis veritatis.', 1),
Message('Quae quae praeceps feminea quae truculenti humanitatisque cum humanitatisque in truculenti abrupte imperatoris mariti regina regina ad lenitate veritatis veritatis.', 0),
Message('Quae quae praeceps feminea quae truculenti humanitatisque cum humanitatisque in truculenti abrupte imperatoris mariti regina regina ad lenitate veritatis veritatis.', 0),
Message('Quae quae praeceps feminea quae truculenti humanitatisque cum humanitatisque in truculenti abrupte imperatoris mariti regina regina ad lenitate veritatis veritatis.', 1),
],
),
),
Row(
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
crossAxisAlignment: CrossAxisAlignment.center,
children: [
Container(
height: height*0.08,
color: Color(0xFF141414),
width: width*0.8,
child: Container(
margin: EdgeInsets.fromLTRB(20, 10, 0, 10),
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(100),
color: Colors.white,
),
child: Padding(
padding: EdgeInsets.fromLTRB(10, 0, 10, 0),
child: TextField(
decoration: InputDecoration(
border: InputBorder.none,
hintText: "Envoyer un message..."
),
cursorColor: Colors.purple,
textAlign: TextAlign.left,
),
),
),
),
Container(
width: 40,
height: 40,
margin: EdgeInsets.fromLTRB(0, 0, 0, 0),
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(100),
color: Colors.blue,
),
child: Icon(Icons.send, size: 20, color: Colors.white,),
)
],
),
],
),
),
);
}
Widget Message(String message, int user) {
if(user == 0){
return Container(
margin: EdgeInsets.fromLTRB(40, 7, 80, 7),
decoration: BoxDecoration(
borderRadius: BorderRadius.only(
bottomRight: Radius.circular(20),
topLeft: Radius.circular(20),
topRight: Radius.circular(20),
bottomLeft: Radius.circular(20),
),
border: Border.all(width: 1.5,
color: Color(0xFF9C9C9C).withOpacity(0.3)),
color: Color(0xFF191919),
),
child: Padding(
padding: EdgeInsets.fromLTRB(20, 20, 20, 20),
child: Text(message,style: TextStyle(fontFamily: 'DMSans', color: Colors.white ,fontSize: 19, fontWeight: FontWeight.w400),
)),
);
}
else{
return Container(
margin: EdgeInsets.fromLTRB(80, 7, 40, 7),
decoration: BoxDecoration(
borderRadius: BorderRadius.only(
bottomRight: Radius.circular(20),
bottomLeft: Radius.circular(20),
topLeft: Radius.circular(20),
topRight: Radius.circular(20),
),
color: Color(0xFF2F2F2F),
),
child: Padding(
padding: EdgeInsets.fromLTRB(20, 20, 20, 20),
child: Text(message,style: TextStyle(fontFamily: 'DMSans', color: Colors.white ,fontSize: 19, fontWeight: FontWeight.w400),
)),
);
}
}
}

@ -4,7 +4,6 @@ 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);
@ -22,14 +21,13 @@ class _MainPageState extends State<MainPage> {
DiscoveryWidget(),
SpotsWidget(),
Center(child: Text('Tops'),),
MessagesWidget(),
Center(child: Text('Messages'),),
SettingsWidget(),
];
@override
Widget build(BuildContext context) {
double height = MediaQuery.of(context).size.height;
return Scaffold(
resizeToAvoidBottomInset: false,
body: screens[_index],
bottomNavigationBar: NavigationBarTheme(
data: NavigationBarThemeData(

@ -1,3 +0,0 @@
import 'package:flutter/cupertino.dart';

@ -51,14 +51,14 @@ class _CardWidgetState extends State<CardWidget>{
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),
),
);
@ -77,9 +77,6 @@ class _CardWidgetState extends State<CardWidget>{
case CardStatus.discovery:
final child = buildStamp(image: 'assets/images/icon_discovery.png', opacity: opacity);
return child;
case CardStatus.message:
final child = buildStamp(image: 'assets/images/icon_messages.png', opacity: opacity);
return child;
default:
return Container();
@ -127,7 +124,7 @@ class _CardWidgetState extends State<CardWidget>{
..translate(-center.dx, -center.dy);
return AnimatedContainer(
curve: Curves.easeOut,
curve: Curves.easeInOut,
duration: Duration(milliseconds: milliseconds),
transform: rotatedMatrix..translate(position.dx, position.dy),
child: Stack(
@ -152,7 +149,7 @@ class _CardWidgetState extends State<CardWidget>{
onPanEnd: (details) {
final provider = Provider.of<CardProvider>(context, listen: false);
provider.endPosition(this.context);
provider.endPosition();
},

@ -13,10 +13,11 @@ class _DiscoveryWidgetState extends State<DiscoveryWidget> {
@override
Widget build(BuildContext context) {
return Container(
color: Color(0xFF141414),
return Scaffold(
backgroundColor: Color(0xFF141414),
resizeToAvoidBottomInset: false,
child: Padding(padding: EdgeInsets.fromLTRB(30, 50, 30, 0),
body: Padding(padding: EdgeInsets.fromLTRB(30, 50, 30, 0),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
@ -55,50 +56,12 @@ class _DiscoveryWidgetState extends State<DiscoveryWidget> {
height: 60,
width: 60,
decoration: BoxDecoration(
border: Border.all(width: 0, color: Colors.grey.withOpacity(0)),
borderRadius: BorderRadius.all(Radius.circular(10)),
image: DecorationImage(
image: NetworkImage('https://www.goutemesdisques.com/uploads/tx_gmdchron/pi1/L_Etrange_Histoire_de_Mr_Anderson.jpg'),
fit: BoxFit.cover,
),
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),
@ -133,11 +96,12 @@ class _DiscoveryWidgetState extends State<DiscoveryWidget> {
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)),
),
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),
@ -172,11 +136,12 @@ class _DiscoveryWidgetState extends State<DiscoveryWidget> {
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)),
),
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),

@ -1,228 +0,0 @@
import 'package:dafl_project_flutter/views/pages/main/p_conversation.dart';
import 'package:dafl_project_flutter/views/pages/main/p_main.dart';
import 'package:flutter/material.dart';
import 'package:fluttericon/font_awesome5_icons.dart';
import 'package:page_transition/page_transition.dart';
class MessagesWidget extends StatefulWidget {
const MessagesWidget({Key? key}) : super(key: key);
@override
State<MessagesWidget> createState() => _MessagesWidgetState();
}
class _MessagesWidgetState extends State<MessagesWidget> {
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(
color: Colors.transparent,
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),),
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,),
GestureDetector(
onTap: () {
Navigator.of(context).push(PageTransition(
duration: Duration(milliseconds: 200),
reverseDuration: Duration(milliseconds: 200),
type: PageTransitionType.rightToLeftWithFade,
childCurrent: context.widget,
child: ConversationPage()));
},
child: MessagesButtonWidget(),
),
],
);
}
}

@ -16,17 +16,6 @@ class _ProfilWidgetState extends State<ProfilWidget> {
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(
@ -155,10 +144,11 @@ class MainPageProfil extends StatelessWidget {
margin: EdgeInsets.fromLTRB(15, 0, 0, 0),
child: ClipRRect(
borderRadius: BorderRadius.circular(15),
child: FadeInImage.assetNetwork(
child: Image(
height: 90,
width: 90,
placeholder: "assets/images/loadingPlaceholder.gif", image: 'https://images.genius.com/ef4849be3da5fdb22ea9e656679be3a3.600x600x1.jpg'),
image: NetworkImage('https://images.genius.com/ef4849be3da5fdb22ea9e656679be3a3.600x600x1.jpg'),
),
),
),
Container(
@ -219,6 +209,5 @@ class MainPageProfil extends StatelessWidget {
),
),
);
}
}

@ -129,4 +129,3 @@ class _SettingsWidgetState extends State<SettingsWidget> {
);
}
}

@ -6,7 +6,6 @@ import 'package:provider/provider.dart';
import '../../../main.dart';
import 'package:rive/rive.dart';
import 'package:animations/animations.dart';
import 'package:vibration/vibration.dart';
class SpotsWidget extends StatefulWidget {
const SpotsWidget({Key? key}) : super(key: key);
@ -27,10 +26,11 @@ class _SpotsWidgetState extends State<SpotsWidget> {
double height = MediaQuery.of(context).size.height;
double width = MediaQuery.of(context).size.width;
final provider = Provider.of<CardProvider>(context);
return Container(
return Scaffold(
color: Color(0xFF141414),
child: Container(
resizeToAvoidBottomInset: false,
backgroundColor: Color(0xFF141414),
body: Container(
height: double.maxFinite,
child: Stack(
children: [
@ -50,7 +50,9 @@ class _SpotsWidgetState extends State<SpotsWidget> {
decoration: BoxDecoration(color: Colors.black.withOpacity(0.4)),
),),
),),
Align(
Padding(
padding: EdgeInsets.fromLTRB(0, 0, 0,height*0.03),
child: Align(
alignment: FractionalOffset.bottomCenter,
child: OpenContainer(
@ -65,6 +67,7 @@ class _SpotsWidgetState extends State<SpotsWidget> {
},
),
),
),
Center(
child: Container(
width: 300,
@ -76,14 +79,13 @@ class _SpotsWidgetState extends State<SpotsWidget> {
top: height*0.68,
width: width,
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
mainAxisAlignment: MainAxisAlignment.center,
children: [
GestureDetector(
onTap: () {
final provider = Provider.of<CardProvider>(context, listen: false);
provider.dislike();
},
child: Image.asset(
'assets/images/bouton_dislike.png',
@ -92,6 +94,9 @@ class _SpotsWidgetState extends State<SpotsWidget> {
fit: BoxFit.cover,
),
),
SizedBox(
width: width*0.1,
),
GestureDetector(
onTap: () {
final provider = Provider.of<CardProvider>(context, listen: false);
@ -104,22 +109,13 @@ class _SpotsWidgetState extends State<SpotsWidget> {
fit: BoxFit.cover,
),
),
GestureDetector(
onTap: () {
final provider = Provider.of<CardProvider>(context, listen: false);
provider.message(this.context);
},
child: Image.asset(
'assets/images/bouton_messages.png',
height: 70,
width: 70,
fit: BoxFit.cover,
),
SizedBox(
width: width*0.1,
),
GestureDetector(
onTap: () {
final provider = Provider.of<CardProvider>(context, listen: false);
provider.like(this.context);
provider.like();
},
child: Image.asset(
'assets/images/bouton_like.png',
@ -179,8 +175,6 @@ class _SpotsWidgetState extends State<SpotsWidget> {
);
}
}
@ -672,10 +666,7 @@ class PreviewInfoWidget extends StatelessWidget{
decoration: BoxDecoration(
color: Color(0xFF24243A).withOpacity(0.40),
border: Border.all(width: 0, color: Colors.grey.withOpacity(0)),
borderRadius: BorderRadius.only(
topLeft: Radius.circular(20),
topRight: Radius.circular(20),
),
borderRadius: BorderRadius.all(Radius.circular(15)),
),
child: Row(
mainAxisAlignment: MainAxisAlignment.center,

@ -1,6 +1,9 @@
import 'dart:ui';
import 'package:dafl_project_flutter/persistence/database_saver.dart';
import 'package:flutter/material.dart';
import 'package:page_transition/page_transition.dart';
import '../../../controller/controller.dart';
import '../../../main.dart';
import '../sign_up/p_sign_up.dart';
@ -13,6 +16,10 @@ class SignInPage extends StatefulWidget {
class _SignInPageState extends State<SignInPage> {
var boxColor = Colors.white;
Controller ctrl = Controller();
TextEditingController password = new TextEditingController();
TextEditingController username = new TextEditingController();
@override
bool isChecked = false;
@ -68,6 +75,7 @@ class _SignInPageState extends State<SignInPage> {
),
Padding(padding: EdgeInsets.fromLTRB(50, 0, 20, 0),
child: TextField(
controller: username,
decoration: InputDecoration(
border: InputBorder.none,
),
@ -111,7 +119,7 @@ class _SignInPageState extends State<SignInPage> {
),Padding(padding: EdgeInsets.fromLTRB(50, 0, 20, 0),
child: TextField(
obscureText: true,
controller: password,
decoration: InputDecoration(
border: InputBorder.none,
),
@ -165,6 +173,10 @@ class _SignInPageState extends State<SignInPage> {
highlightColor: Colors.grey.shade100,
splashColor: Color(0xFF406DE1),
onTap: (){
ctrl.load(username.text, password.text);
Navigator.of(context).push(
PageTransition(
type: PageTransitionType.fade,
@ -175,10 +187,9 @@ class _SignInPageState extends State<SignInPage> {
child:Ink(
child: Align(
alignment: Alignment.center,
child: Icon(
Icons.check,
color: Color(0xFF406DE1),
size: 60.0,
child: Image.asset(
'assets/images/valid_logo.png',
width: 40,
),
),
padding: EdgeInsets.fromLTRB(0, 10, 0, 0),
@ -222,6 +233,15 @@ class _SignInPageState extends State<SignInPage> {
SizedBox(height: 60,),
],
),
Align(
alignment: Alignment.topRight,
child: Container(
padding: EdgeInsets.fromLTRB(0, 20, 20, 0),
child: Text("v1.0",
style: TextStyle(fontFamily: 'DMSans', color: Colors.white.withOpacity(0.5) ,fontSize: 17, fontWeight: FontWeight.w700),
),
)
),
],
),

@ -1,7 +1,16 @@
import 'package:dafl_project_flutter/controller/controller.dart';
import 'package:dafl_project_flutter/persistence/loader.dart';
import 'package:flutter/material.dart';
import 'package:page_transition/page_transition.dart';
import '../../../persistence/saver.dart';
import '../home/p_home.dart';
import '../sign_in/p_sign_in.dart';
import '../../../persistence/database_saver.dart';
import '../../../persistence/database_loader.dart';
import '../../../controller/controller.dart';
import '../../../model/user.dart';
class SignUpPage extends StatefulWidget {
const SignUpPage({Key? key}) : super(key: key);
@ -11,11 +20,17 @@ class SignUpPage extends StatefulWidget {
}
class _SignUpPageState extends State<SignUpPage> {
final Controller ctrl = Controller();
Color boxColor = Colors.white;
bool isHovering = false;
@override
TextEditingController passwordconfirm = new TextEditingController();
//Text field that entered the username of the user
TextEditingController username = new TextEditingController();
bool isChecked = false;
Widget build(BuildContext context) {
return Scaffold(
@ -69,6 +84,7 @@ class _SignUpPageState extends State<SignUpPage> {
),
Padding(padding: EdgeInsets.fromLTRB(50, 0, 20, 0),
child: TextField(
controller: username,
decoration: InputDecoration(
border: InputBorder.none,
),
@ -112,7 +128,6 @@ class _SignUpPageState extends State<SignUpPage> {
),Padding(padding: EdgeInsets.fromLTRB(50, 0, 20, 0),
child: TextField(
obscureText: true,
decoration: InputDecoration(
border: InputBorder.none,
),
@ -156,7 +171,6 @@ class _SignUpPageState extends State<SignUpPage> {
),Padding(padding: EdgeInsets.fromLTRB(50, 0, 20, 0),
child: TextField(
obscureText: true,
controller: passwordconfirm,
decoration: InputDecoration(
border: InputBorder.none,
@ -231,6 +245,8 @@ class _SignUpPageState extends State<SignUpPage> {
highlightColor: Colors.grey.shade100,
splashColor: Color(0xFF406DE1),
onTap: (){
ctrl.save(User(username.text, passwordconfirm.text));
setState(() {
boxColor = Colors.blue;
});
@ -246,10 +262,9 @@ class _SignUpPageState extends State<SignUpPage> {
child:Ink(
child: Align(
alignment: Alignment.center,
child: Icon(
Icons.check,
color: Color(0xFF406DE1),
size: 60.0,
child: Image.asset(
'assets/images/valid_logo.png',
width: 47,
),
),
padding: EdgeInsets.fromLTRB(0, 10, 0, 0),
@ -275,7 +290,7 @@ class _SignUpPageState extends State<SignUpPage> {
Row(
mainAxisAlignment: MainAxisAlignment.center,
children: [
Text('Tu as déjà un compte ?', style: TextStyle(color: Colors.white, fontWeight: FontWeight.normal, fontSize: 17)),
Text('Tu nas déjà un compte?', style: TextStyle(color: Colors.white, fontWeight: FontWeight.normal, fontSize: 17)),
GestureDetector(
onTap: () {
Navigator.of(context).push(
@ -293,6 +308,15 @@ class _SignUpPageState extends State<SignUpPage> {
SizedBox(height: 60,),
],
),
Align(
alignment: Alignment.topRight,
child: Container(
padding: EdgeInsets.fromLTRB(0, 20, 20, 0),
child: Text("v1.0",
style: TextStyle(fontFamily: 'DMSans', color: Colors.white.withOpacity(0.5) ,fontSize: 17, fontWeight: FontWeight.w700),
),
)
),
],
),

@ -43,6 +43,13 @@ packages:
url: "https://pub.dartlang.org"
source: hosted
version: "1.2.1"
charcode:
dependency: transitive
description:
name: charcode
url: "https://pub.dartlang.org"
source: hosted
version: "1.3.1"
checked_yaml:
dependency: transitive
description:
@ -71,6 +78,13 @@ packages:
url: "https://pub.dartlang.org"
source: hosted
version: "1.16.0"
convert:
dependency: transitive
description:
name: convert
url: "https://pub.dartlang.org"
source: hosted
version: "3.1.1"
crypto:
dependency: transitive
description:
@ -99,6 +113,20 @@ packages:
url: "https://pub.dartlang.org"
source: hosted
version: "1.3.1"
ffi:
dependency: transitive
description:
name: ffi
url: "https://pub.dartlang.org"
source: hosted
version: "2.0.1"
file:
dependency: transitive
description:
name: file
url: "https://pub.dartlang.org"
source: hosted
version: "6.1.4"
flutter:
dependency: "direct main"
description: flutter
@ -149,48 +177,6 @@ packages:
url: "https://pub.dartlang.org"
source: hosted
version: "8.1.1"
geolocator:
dependency: "direct main"
description:
name: geolocator
url: "https://pub.dartlang.org"
source: hosted
version: "9.0.2"
geolocator_android:
dependency: transitive
description:
name: geolocator_android
url: "https://pub.dartlang.org"
source: hosted
version: "4.1.4"
geolocator_apple:
dependency: transitive
description:
name: geolocator_apple
url: "https://pub.dartlang.org"
source: hosted
version: "2.2.3"
geolocator_platform_interface:
dependency: transitive
description:
name: geolocator_platform_interface
url: "https://pub.dartlang.org"
source: hosted
version: "4.0.7"
geolocator_web:
dependency: transitive
description:
name: geolocator_web
url: "https://pub.dartlang.org"
source: hosted
version: "2.1.6"
geolocator_windows:
dependency: transitive
description:
name: geolocator_windows
url: "https://pub.dartlang.org"
source: hosted
version: "0.1.1"
graphs:
dependency: transitive
description:
@ -206,7 +192,7 @@ packages:
source: hosted
version: "0.15.1"
http:
dependency: "direct main"
dependency: transitive
description:
name: http
url: "https://pub.dartlang.org"
@ -247,6 +233,13 @@ packages:
url: "https://pub.dartlang.org"
source: hosted
version: "2.0.1"
logging:
dependency: transitive
description:
name: logging
url: "https://pub.dartlang.org"
source: hosted
version: "1.1.0"
matcher:
dependency: transitive
description:
@ -268,6 +261,13 @@ packages:
url: "https://pub.dartlang.org"
source: hosted
version: "1.8.0"
mime:
dependency: transitive
description:
name: mime
url: "https://pub.dartlang.org"
source: hosted
version: "1.0.2"
nested:
dependency: transitive
description:
@ -289,6 +289,55 @@ packages:
url: "https://pub.dartlang.org"
source: hosted
version: "1.8.2"
path_provider:
dependency: "direct main"
description:
name: path_provider
url: "https://pub.dartlang.org"
source: hosted
version: "2.0.11"
path_provider_android:
dependency: transitive
description:
name: path_provider_android
url: "https://pub.dartlang.org"
source: hosted
version: "2.0.21"
path_provider_ios:
dependency: transitive
description:
name: path_provider_ios
url: "https://pub.dartlang.org"
source: hosted
version: "2.0.11"
path_provider_linux:
dependency: transitive
description:
name: path_provider_linux
url: "https://pub.dartlang.org"
source: hosted
version: "2.1.7"
path_provider_macos:
dependency: transitive
description:
name: path_provider_macos
url: "https://pub.dartlang.org"
source: hosted
version: "2.0.6"
path_provider_platform_interface:
dependency: transitive
description:
name: path_provider_platform_interface
url: "https://pub.dartlang.org"
source: hosted
version: "2.0.5"
path_provider_windows:
dependency: transitive
description:
name: path_provider_windows
url: "https://pub.dartlang.org"
source: hosted
version: "2.1.3"
petitparser:
dependency: transitive
description:
@ -296,6 +345,13 @@ packages:
url: "https://pub.dartlang.org"
source: hosted
version: "5.1.0"
platform:
dependency: transitive
description:
name: platform
url: "https://pub.dartlang.org"
source: hosted
version: "3.1.0"
plugin_platform_interface:
dependency: transitive
description:
@ -303,6 +359,20 @@ packages:
url: "https://pub.dartlang.org"
source: hosted
version: "2.1.3"
postgresql2:
dependency: "direct main"
description:
name: postgresql2
url: "https://pub.dartlang.org"
source: hosted
version: "1.0.3"
process:
dependency: transitive
description:
name: process
url: "https://pub.dartlang.org"
source: hosted
version: "4.2.4"
provider:
dependency: "direct main"
description:
@ -310,6 +380,13 @@ packages:
url: "https://pub.dartlang.org"
source: hosted
version: "6.0.4"
rikulo_commons:
dependency: transitive
description:
name: rikulo_commons
url: "https://pub.dartlang.org"
source: hosted
version: "5.2.1"
rive:
dependency: "direct main"
description:
@ -364,13 +441,6 @@ packages:
url: "https://pub.dartlang.org"
source: hosted
version: "0.4.12"
tuple:
dependency: "direct main"
description:
name: tuple
url: "https://pub.dartlang.org"
source: hosted
version: "2.0.1"
typed_data:
dependency: transitive
description:
@ -399,6 +469,20 @@ packages:
url: "https://pub.dartlang.org"
source: hosted
version: "1.7.6"
win32:
dependency: transitive
description:
name: win32
url: "https://pub.dartlang.org"
source: hosted
version: "3.0.1"
xdg_directories:
dependency: transitive
description:
name: xdg_directories
url: "https://pub.dartlang.org"
source: hosted
version: "0.2.0+2"
xml:
dependency: transitive
description:

@ -32,9 +32,10 @@ dependencies:
flutter:
sdk: flutter
# The following adds the Cupertino Icons font to your application.
# Use with the CupertinoIcons class for iOS style icons.
cupertino_icons: ^1.0.5
cupertino_icons: ^1.0.2
page_transition: ^2.0.9
provider: ^6.0.4
fluttericon: ^2.0.0
@ -42,10 +43,8 @@ dependencies:
animations: ^2.0.7
fluttertoast: ^8.1.1
vibration: ^1.7.6
geolocator: ^9.0.2
tuple: ^2.0.1
http: ^0.13.5
postgresql2: ^1.0.3
path_provider: ^2.0.11
dev_dependencies:
flutter_test:
@ -56,9 +55,9 @@ dev_dependencies:
# activated in the `analysis_options.yaml` file located at the root of your
# package. See that file for information about deactivating specific lint
# rules and activating additional ones.
flutter_lints: ^2.0.1
flutter_lints: ^2.0.0
flutter_launcher_icons: ^0.10.0
flutter_native_splash: ^2.2.13
flutter_native_splash: ^2.2.11
flutter_native_splash:
android: true
@ -88,8 +87,7 @@ flutter:
# To add assets to your application, add an assets section, like this:
assets:
- assets/images/
- assets/fonts/
- assets/
# An image asset can refer to one or more resolution-specific "variants", see
# https://flutter.dev/assets-and-images/#resolution-aware

@ -0,0 +1,15 @@
import 'package:dafl_project_flutter/main.dart';
import 'package:dafl_project_flutter/persistence/database_connexion.dart';
import 'package:flutter/cupertino.dart';
Future<void> main() async {
MyApp mainApp = MyApp();
runApp(mainApp);
DatabaseConnexion d = DatabaseConnexion();
d.initConnexion();
}
Loading…
Cancel
Save