Compare commits

...

33 Commits

Author SHA1 Message Date
dorian.hodin 9fa0510a87 Add ADMINS in .drone.yml
continuous-integration/drone/push Build is passing Details
2 years ago
dorian.hodin d4a6daf4d2 Re-deploy containers 2
2 years ago
dorian.hodin d3cc32a0b8 Re-deploy containers
2 years ago
Audric SABATIER b99d407c91 ADD : add spot user to list of user conv and send message to him (Swipe on top)
continuous-integration/drone/push Build is passing Details
2 years ago
dorian.hodin b61f9d6f07 Timer 10 => 20
continuous-integration/drone/push Build is passing Details
2 years ago
Lucas Delanier a029de17c9 fix some visuals problems
continuous-integration/drone/push Build is passing Details
2 years ago
Lucas Delanier b53f683da7 Merge remote-tracking branch 'origin/#MSG01/ImplementationFirebaseMessaging' into #MSG01/ImplementationFirebaseMessaging
continuous-integration/drone/push Build is passing Details
2 years ago
Lucas Delanier 48e868084a fix send bar
2 years ago
Audric SABATIER fee30256cc ADD : Timestamp to display messages in order
continuous-integration/drone/push Build is passing Details
2 years ago
Audric SABATIER a2ee5b35a5 ADD : Display all messages in conv
continuous-integration/drone/push Build is passing Details
2 years ago
Dorian HODIN 6f59204361 change php_server
continuous-integration/drone/push Build is passing Details
2 years ago
Dorian HODIN 7a77591c11 Now work with containers
continuous-integration/drone/push Build is passing Details
2 years ago
Dorian HODIN ae00ce8b76 .drone.yml update
continuous-integration/drone/push Build was killed Details
2 years ago
Dorian HODIN 1e5e6f997a Server Web on Containers, change db_location to public
continuous-integration/drone/push Build is passing Details
2 years ago
Audric SABATIER 79e56d12ba ADD : Display users on top of conv page
continuous-integration/drone/push Build is passing Details
2 years ago
Audric SABATIER 407bd19f4a ADD : Get user from Firestore and display in conv page
continuous-integration/drone/push Build is failing Details
2 years ago
Lucas Delanier 7880edf861 fix add to discovery
continuous-integration/drone/push Build is passing Details
2 years ago
dorian.hodin d2b9ca3547 Now good URL for Location DB and server
continuous-integration/drone/push Build is passing Details
2 years ago
Lucas Delanier d77b18503a fix name scrolling on profile page
continuous-integration/drone/push Build is passing Details
2 years ago
Dorian HODIN 4f1436fc5b Make button play with spotify visible on spot + spot working + temporary IP adress
continuous-integration/drone/push Build is passing Details
2 years ago
Lucas Delanier a9dd2cd336 fix navbar height
continuous-integration/drone/push Build is passing Details
2 years ago
Lucas Delanier 98afc0967e fix page spot
continuous-integration/drone/push Build is passing Details
2 years ago
Lucas Delanier f320c8e113 fix creation of the playlist
continuous-integration/drone/push Build is passing Details
2 years ago
Dorian HODIN 29a513a484 CI Test
continuous-integration/drone/push Build is passing Details
2 years ago
Lucas Delanier a8df8e214e fix problem with discoveries
continuous-integration/drone/push Build is passing Details
2 years ago
Audric SABATIER 67df69604b ADD : Methods call by the controller and some comments
continuous-integration/drone/push Build is passing Details
2 years ago
Audric SABATIER 9497713be4 ADD : Methods to get messages from FireStrore
continuous-integration/drone/push Build is passing Details
2 years ago
Audric SABATIER dc951b015e ADD : Firebase options files to complete CI
continuous-integration/drone/push Build is passing Details
2 years ago
Audric SABATIER cee8a2fd80 ADD : Send messages From MassagingService by controller
continuous-integration/drone/push Build is failing Details
2 years ago
Audric SABATIER 7f35484e2c ADD : HashMap to message class and send methods
continuous-integration/drone/push Build is failing Details
2 years ago
Audric SABATIER d3afd5714f ADD : FIREBASE to the project
continuous-integration/drone/push Build is failing Details
2 years ago
Lucas Delanier e7402aa914 fix problem with late data
continuous-integration/drone/push Build is passing Details
2 years ago
Audric SABATIER b9a9f72d0c ADD: New database and new logs Update
continuous-integration/drone/push Build is passing Details
2 years ago

@ -52,6 +52,8 @@ steps:
CONTAINERNAME: apiredirect
COMMAND: create
OVERWRITE: true
ADMINS: dorianhodin,alexislamande,baptistebaverel,johanlachenal
depends_on: [ web-server ]
# docker image build
@ -67,6 +69,7 @@ steps:
password:
from_secret: SECRET_PASSWD
# container deployment
- name: deploy-php
image: hub.codefirst.iut.uca.fr/thomas.bellembois/codefirst-dockerproxy-clientdrone:latest
@ -85,6 +88,7 @@ steps:
from_secret: db_password
CODEFIRST_CLIENTDRONE_ENV_ROOT_PASSWORD:
from_secret: db_root_password
ADMINS: dorianhodin,alexislamande,baptistebaverel,johanlachenal
depends_on: [ php_script ]
# database container deployment
@ -92,10 +96,10 @@ steps:
image: hub.codefirst.iut.uca.fr/thomas.bellembois/codefirst-dockerproxy-clientdrone:latest
environment:
IMAGENAME: mariadb:10.5
CONTAINERNAME: mysql_location
CONTAINERNAME: db_location
COMMAND: create
# OVERWRITE: true
PRIVATE: true
OVERWRITE: true
# PRIVATE: true
CODEFIRST_CLIENTDRONE_ENV_MARIADB_ROOT_PASSWORD:
from_secret: db_root_password
CODEFIRST_CLIENTDRONE_ENV_MARIADB_DATABASE:
@ -104,4 +108,5 @@ steps:
from_secret: db_user
CODEFIRST_CLIENTDRONE_ENV_MARIADB_PASSWORD:
from_secret: db_password
ADMINS: dorianhodin,alexislamande,baptistebaverel,johanlachenal
depends_on: [ deploy-php ]

@ -1,5 +1,6 @@
<component name="ProjectCodeStyleConfiguration">
<code_scheme name="Project" version="173">
<option name="WRAP_WHEN_TYPING_REACHES_RIGHT_MARGIN" value="true" />
<JetCodeStyleSettings>
<option name="CODE_STYLE_DEFAULTS" value="KOTLIN_OFFICIAL" />
</JetCodeStyleSettings>

@ -2,17 +2,10 @@
<library name="Dart Packages" type="DartPackagesLibraryType">
<properties>
<option name="packageNameToDirsMap">
<entry key="_fe_analyzer_shared">
<entry key="_flutterfire_internals">
<value>
<list>
<option value="$PROJECT_DIR$/../flutter/.pub-cache/hosted/pub.dartlang.org/_fe_analyzer_shared-50.0.0/lib" />
</list>
</value>
</entry>
<entry key="analyzer">
<value>
<list>
<option value="$PROJECT_DIR$/../flutter/.pub-cache/hosted/pub.dartlang.org/analyzer-5.2.0/lib" />
<option value="$PROJECT_DIR$/../flutter/.pub-cache/hosted/pub.dartlang.org/_flutterfire_internals-1.0.12/lib" />
</list>
</value>
</entry>
@ -86,59 +79,59 @@
</list>
</value>
</entry>
<entry key="collection">
<entry key="cloud_firestore">
<value>
<list>
<option value="$PROJECT_DIR$/../flutter/.pub-cache/hosted/pub.dartlang.org/collection-1.16.0/lib" />
<option value="$PROJECT_DIR$/../flutter/.pub-cache/hosted/pub.dartlang.org/cloud_firestore-4.3.1/lib" />
</list>
</value>
</entry>
<entry key="color">
<entry key="cloud_firestore_platform_interface">
<value>
<list>
<option value="$PROJECT_DIR$/../flutter/.pub-cache/hosted/pub.dartlang.org/color-3.0.0/lib" />
<option value="$PROJECT_DIR$/../flutter/.pub-cache/hosted/pub.dartlang.org/cloud_firestore_platform_interface-5.10.1/lib" />
</list>
</value>
</entry>
<entry key="convert">
<entry key="cloud_firestore_web">
<value>
<list>
<option value="$PROJECT_DIR$/../flutter/.pub-cache/hosted/pub.dartlang.org/convert-3.1.1/lib" />
<option value="$PROJECT_DIR$/../flutter/.pub-cache/hosted/pub.dartlang.org/cloud_firestore_web-3.2.1/lib" />
</list>
</value>
</entry>
<entry key="crypto">
<entry key="collection">
<value>
<list>
<option value="$PROJECT_DIR$/../flutter/.pub-cache/hosted/pub.dartlang.org/crypto-3.0.2/lib" />
<option value="$PROJECT_DIR$/../flutter/.pub-cache/hosted/pub.dartlang.org/collection-1.16.0/lib" />
</list>
</value>
</entry>
<entry key="csslib">
<entry key="convert">
<value>
<list>
<option value="$PROJECT_DIR$/../flutter/.pub-cache/hosted/pub.dartlang.org/csslib-0.17.2/lib" />
<option value="$PROJECT_DIR$/../flutter/.pub-cache/hosted/pub.dartlang.org/convert-3.1.1/lib" />
</list>
</value>
</entry>
<entry key="cupertino_icons">
<entry key="crypto">
<value>
<list>
<option value="$PROJECT_DIR$/../flutter/.pub-cache/hosted/pub.dartlang.org/cupertino_icons-1.0.5/lib" />
<option value="$PROJECT_DIR$/../flutter/.pub-cache/hosted/pub.dartlang.org/crypto-3.0.2/lib" />
</list>
</value>
</entry>
<entry key="dart_style">
<entry key="csslib">
<value>
<list>
<option value="$PROJECT_DIR$/../flutter/.pub-cache/hosted/pub.dartlang.org/dart_style-2.2.4/lib" />
<option value="$PROJECT_DIR$/../flutter/.pub-cache/hosted/pub.dartlang.org/csslib-0.17.2/lib" />
</list>
</value>
</entry>
<entry key="dartx">
<entry key="cupertino_icons">
<value>
<list>
<option value="$PROJECT_DIR$/../flutter/.pub-cache/hosted/pub.dartlang.org/dartx-1.1.0/lib" />
<option value="$PROJECT_DIR$/../flutter/.pub-cache/hosted/pub.dartlang.org/cupertino_icons-1.0.5/lib" />
</list>
</value>
</entry>
@ -170,24 +163,52 @@
</list>
</value>
</entry>
<entry key="flutter">
<entry key="firebase_core">
<value>
<list>
<option value="$PROJECT_DIR$/../flutter/packages/flutter/lib" />
<option value="$PROJECT_DIR$/../flutter/.pub-cache/hosted/pub.dartlang.org/firebase_core-2.4.1/lib" />
</list>
</value>
</entry>
<entry key="firebase_core_platform_interface">
<value>
<list>
<option value="$PROJECT_DIR$/../flutter/.pub-cache/hosted/pub.dartlang.org/firebase_core_platform_interface-4.5.2/lib" />
</list>
</value>
</entry>
<entry key="firebase_core_web">
<value>
<list>
<option value="$PROJECT_DIR$/../flutter/.pub-cache/hosted/pub.dartlang.org/firebase_core_web-2.1.0/lib" />
</list>
</value>
</entry>
<entry key="flutter_gen">
<entry key="firebase_messaging">
<value>
<list>
<option value="$PROJECT_DIR$/../flutter/.pub-cache/hosted/pub.dartlang.org/flutter_gen-5.1.0+1/lib" />
<option value="$PROJECT_DIR$/../flutter/.pub-cache/hosted/pub.dartlang.org/firebase_messaging-14.2.1/lib" />
</list>
</value>
</entry>
<entry key="flutter_gen_core">
<entry key="firebase_messaging_platform_interface">
<value>
<list>
<option value="$PROJECT_DIR$/../flutter/.pub-cache/hosted/pub.dartlang.org/flutter_gen_core-5.1.0+1/lib" />
<option value="$PROJECT_DIR$/../flutter/.pub-cache/hosted/pub.dartlang.org/firebase_messaging_platform_interface-4.2.10/lib" />
</list>
</value>
</entry>
<entry key="firebase_messaging_web">
<value>
<list>
<option value="$PROJECT_DIR$/../flutter/.pub-cache/hosted/pub.dartlang.org/firebase_messaging_web-3.2.11/lib" />
</list>
</value>
</entry>
<entry key="flutter">
<value>
<list>
<option value="$PROJECT_DIR$/../flutter/packages/flutter/lib" />
</list>
</value>
</entry>
@ -310,13 +331,6 @@
</list>
</value>
</entry>
<entry key="glob">
<value>
<list>
<option value="$PROJECT_DIR$/../flutter/.pub-cache/hosted/pub.dartlang.org/glob-2.1.1/lib" />
</list>
</value>
</entry>
<entry key="graphs">
<value>
<list>
@ -436,13 +450,6 @@
</list>
</value>
</entry>
<entry key="package_config">
<value>
<list>
<option value="$PROJECT_DIR$/../flutter/.pub-cache/hosted/pub.dartlang.org/package_config-2.1.0/lib" />
</list>
</value>
</entry>
<entry key="page_transition">
<value>
<list>
@ -548,13 +555,6 @@
</list>
</value>
</entry>
<entry key="pub_semver">
<value>
<list>
<option value="$PROJECT_DIR$/../flutter/.pub-cache/hosted/pub.dartlang.org/pub_semver-2.1.3/lib" />
</list>
</value>
</entry>
<entry key="random_string">
<value>
<list>
@ -639,13 +639,6 @@
</list>
</value>
</entry>
<entry key="time">
<value>
<list>
<option value="$PROJECT_DIR$/../flutter/.pub-cache/hosted/pub.dartlang.org/time-2.1.3/lib" />
</list>
</value>
</entry>
<entry key="typed_data">
<value>
<list>
@ -674,13 +667,6 @@
</list>
</value>
</entry>
<entry key="watcher">
<value>
<list>
<option value="$PROJECT_DIR$/../flutter/.pub-cache/hosted/pub.dartlang.org/watcher-1.0.2/lib" />
</list>
</value>
</entry>
<entry key="win32">
<value>
<list>
@ -712,8 +698,7 @@
</option>
</properties>
<CLASSES>
<root url="file://$PROJECT_DIR$/../flutter/.pub-cache/hosted/pub.dartlang.org/_fe_analyzer_shared-50.0.0/lib" />
<root url="file://$PROJECT_DIR$/../flutter/.pub-cache/hosted/pub.dartlang.org/analyzer-5.2.0/lib" />
<root url="file://$PROJECT_DIR$/../flutter/.pub-cache/hosted/pub.dartlang.org/_flutterfire_internals-1.0.12/lib" />
<root url="file://$PROJECT_DIR$/../flutter/.pub-cache/hosted/pub.dartlang.org/animations-2.0.7/lib" />
<root url="file://$PROJECT_DIR$/../flutter/.pub-cache/hosted/pub.dartlang.org/archive-3.3.2/lib" />
<root url="file://$PROJECT_DIR$/../flutter/.pub-cache/hosted/pub.dartlang.org/args-2.3.1/lib" />
@ -724,20 +709,24 @@
<root url="file://$PROJECT_DIR$/../flutter/.pub-cache/hosted/pub.dartlang.org/checked_yaml-2.0.1/lib" />
<root url="file://$PROJECT_DIR$/../flutter/.pub-cache/hosted/pub.dartlang.org/cli_util-0.3.5/lib" />
<root url="file://$PROJECT_DIR$/../flutter/.pub-cache/hosted/pub.dartlang.org/clock-1.1.1/lib" />
<root url="file://$PROJECT_DIR$/../flutter/.pub-cache/hosted/pub.dartlang.org/cloud_firestore-4.3.1/lib" />
<root url="file://$PROJECT_DIR$/../flutter/.pub-cache/hosted/pub.dartlang.org/cloud_firestore_platform_interface-5.10.1/lib" />
<root url="file://$PROJECT_DIR$/../flutter/.pub-cache/hosted/pub.dartlang.org/cloud_firestore_web-3.2.1/lib" />
<root url="file://$PROJECT_DIR$/../flutter/.pub-cache/hosted/pub.dartlang.org/collection-1.16.0/lib" />
<root url="file://$PROJECT_DIR$/../flutter/.pub-cache/hosted/pub.dartlang.org/color-3.0.0/lib" />
<root url="file://$PROJECT_DIR$/../flutter/.pub-cache/hosted/pub.dartlang.org/convert-3.1.1/lib" />
<root url="file://$PROJECT_DIR$/../flutter/.pub-cache/hosted/pub.dartlang.org/crypto-3.0.2/lib" />
<root url="file://$PROJECT_DIR$/../flutter/.pub-cache/hosted/pub.dartlang.org/csslib-0.17.2/lib" />
<root url="file://$PROJECT_DIR$/../flutter/.pub-cache/hosted/pub.dartlang.org/cupertino_icons-1.0.5/lib" />
<root url="file://$PROJECT_DIR$/../flutter/.pub-cache/hosted/pub.dartlang.org/dart_style-2.2.4/lib" />
<root url="file://$PROJECT_DIR$/../flutter/.pub-cache/hosted/pub.dartlang.org/dartx-1.1.0/lib" />
<root url="file://$PROJECT_DIR$/../flutter/.pub-cache/hosted/pub.dartlang.org/fading_edge_scrollview-3.0.0/lib" />
<root url="file://$PROJECT_DIR$/../flutter/.pub-cache/hosted/pub.dartlang.org/fake_async-1.3.1/lib" />
<root url="file://$PROJECT_DIR$/../flutter/.pub-cache/hosted/pub.dartlang.org/ffi-2.0.1/lib" />
<root url="file://$PROJECT_DIR$/../flutter/.pub-cache/hosted/pub.dartlang.org/file-6.1.4/lib" />
<root url="file://$PROJECT_DIR$/../flutter/.pub-cache/hosted/pub.dartlang.org/flutter_gen-5.1.0+1/lib" />
<root url="file://$PROJECT_DIR$/../flutter/.pub-cache/hosted/pub.dartlang.org/flutter_gen_core-5.1.0+1/lib" />
<root url="file://$PROJECT_DIR$/../flutter/.pub-cache/hosted/pub.dartlang.org/firebase_core-2.4.1/lib" />
<root url="file://$PROJECT_DIR$/../flutter/.pub-cache/hosted/pub.dartlang.org/firebase_core_platform_interface-4.5.2/lib" />
<root url="file://$PROJECT_DIR$/../flutter/.pub-cache/hosted/pub.dartlang.org/firebase_core_web-2.1.0/lib" />
<root url="file://$PROJECT_DIR$/../flutter/.pub-cache/hosted/pub.dartlang.org/firebase_messaging-14.2.1/lib" />
<root url="file://$PROJECT_DIR$/../flutter/.pub-cache/hosted/pub.dartlang.org/firebase_messaging_platform_interface-4.2.10/lib" />
<root url="file://$PROJECT_DIR$/../flutter/.pub-cache/hosted/pub.dartlang.org/firebase_messaging_web-3.2.11/lib" />
<root url="file://$PROJECT_DIR$/../flutter/.pub-cache/hosted/pub.dartlang.org/flutter_inappwebview-5.7.1/lib" />
<root url="file://$PROJECT_DIR$/../flutter/.pub-cache/hosted/pub.dartlang.org/flutter_launcher_icons-0.10.0/lib" />
<root url="file://$PROJECT_DIR$/../flutter/.pub-cache/hosted/pub.dartlang.org/flutter_lints-2.0.1/lib" />
@ -752,7 +741,6 @@
<root url="file://$PROJECT_DIR$/../flutter/.pub-cache/hosted/pub.dartlang.org/geolocator_platform_interface-4.0.7/lib" />
<root url="file://$PROJECT_DIR$/../flutter/.pub-cache/hosted/pub.dartlang.org/geolocator_web-2.1.6/lib" />
<root url="file://$PROJECT_DIR$/../flutter/.pub-cache/hosted/pub.dartlang.org/geolocator_windows-0.1.1/lib" />
<root url="file://$PROJECT_DIR$/../flutter/.pub-cache/hosted/pub.dartlang.org/glob-2.1.1/lib" />
<root url="file://$PROJECT_DIR$/../flutter/.pub-cache/hosted/pub.dartlang.org/graphs-2.1.0/lib" />
<root url="file://$PROJECT_DIR$/../flutter/.pub-cache/hosted/pub.dartlang.org/home_indicator-2.0.2/lib" />
<root url="file://$PROJECT_DIR$/../flutter/.pub-cache/hosted/pub.dartlang.org/html-0.15.1/lib" />
@ -770,7 +758,6 @@
<root url="file://$PROJECT_DIR$/../flutter/.pub-cache/hosted/pub.dartlang.org/meta-1.8.0/lib" />
<root url="file://$PROJECT_DIR$/../flutter/.pub-cache/hosted/pub.dartlang.org/mime-1.0.2/lib" />
<root url="file://$PROJECT_DIR$/../flutter/.pub-cache/hosted/pub.dartlang.org/nested-1.0.0/lib" />
<root url="file://$PROJECT_DIR$/../flutter/.pub-cache/hosted/pub.dartlang.org/package_config-2.1.0/lib" />
<root url="file://$PROJECT_DIR$/../flutter/.pub-cache/hosted/pub.dartlang.org/page_transition-2.0.9/lib" />
<root url="file://$PROJECT_DIR$/../flutter/.pub-cache/hosted/pub.dartlang.org/path-1.8.2/lib" />
<root url="file://$PROJECT_DIR$/../flutter/.pub-cache/hosted/pub.dartlang.org/path_provider-2.0.11/lib" />
@ -786,7 +773,6 @@
<root url="file://$PROJECT_DIR$/../flutter/.pub-cache/hosted/pub.dartlang.org/postgresql2-1.0.3/lib" />
<root url="file://$PROJECT_DIR$/../flutter/.pub-cache/hosted/pub.dartlang.org/process-4.2.4/lib" />
<root url="file://$PROJECT_DIR$/../flutter/.pub-cache/hosted/pub.dartlang.org/provider-6.0.4/lib" />
<root url="file://$PROJECT_DIR$/../flutter/.pub-cache/hosted/pub.dartlang.org/pub_semver-2.1.3/lib" />
<root url="file://$PROJECT_DIR$/../flutter/.pub-cache/hosted/pub.dartlang.org/random_string-2.3.1/lib" />
<root url="file://$PROJECT_DIR$/../flutter/.pub-cache/hosted/pub.dartlang.org/rikulo_commons-5.2.1/lib" />
<root url="file://$PROJECT_DIR$/../flutter/.pub-cache/hosted/pub.dartlang.org/rive-0.9.1/lib" />
@ -798,12 +784,10 @@
<root url="file://$PROJECT_DIR$/../flutter/.pub-cache/hosted/pub.dartlang.org/term_glyph-1.2.1/lib" />
<root url="file://$PROJECT_DIR$/../flutter/.pub-cache/hosted/pub.dartlang.org/test_api-0.4.12/lib" />
<root url="file://$PROJECT_DIR$/../flutter/.pub-cache/hosted/pub.dartlang.org/text_scroll-0.1.1/lib" />
<root url="file://$PROJECT_DIR$/../flutter/.pub-cache/hosted/pub.dartlang.org/time-2.1.3/lib" />
<root url="file://$PROJECT_DIR$/../flutter/.pub-cache/hosted/pub.dartlang.org/typed_data-1.3.1/lib" />
<root url="file://$PROJECT_DIR$/../flutter/.pub-cache/hosted/pub.dartlang.org/universal_io-2.0.4/lib" />
<root url="file://$PROJECT_DIR$/../flutter/.pub-cache/hosted/pub.dartlang.org/vector_math-2.1.2/lib" />
<root url="file://$PROJECT_DIR$/../flutter/.pub-cache/hosted/pub.dartlang.org/vibration-1.7.6/lib" />
<root url="file://$PROJECT_DIR$/../flutter/.pub-cache/hosted/pub.dartlang.org/watcher-1.0.2/lib" />
<root url="file://$PROJECT_DIR$/../flutter/.pub-cache/hosted/pub.dartlang.org/win32-3.0.1/lib" />
<root url="file://$PROJECT_DIR$/../flutter/.pub-cache/hosted/pub.dartlang.org/xdg_directories-0.2.0+2/lib" />
<root url="file://$PROJECT_DIR$/../flutter/.pub-cache/hosted/pub.dartlang.org/xml-6.1.0/lib" />

Binary file not shown.

After

Width:  |  Height:  |  Size: 20 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 18 KiB

After

Width:  |  Height:  |  Size: 20 KiB

@ -1,4 +1,4 @@
postgres
mdpDaflBd
89.83.54.48
BD-DaflMusic
avnadmin
AVNS_MA4OWhqM3cOMSwKXlzw
pg-206a2fcd-the-3c42.aivencloud.com
Bd-DaflMusic

@ -10,23 +10,46 @@ import '../services/api/api_spotify.dart';
import '../services/database/database_service.dart';
import '../services/position/location.dart';
import 'live_datas.dart';
import 'package:dafl_project_flutter/model/message.dart';
import 'package:dafl_project_flutter/services/messaging/message_database_service.dart';
import 'dart:developer' as dev;
class Controller {
final ApiSpotify _api = ApiSpotify();
late User _currentUser;
final DataBaseService _dataBaseService = DataBaseService();
final LiveData _data = LiveData();
final MessageDatabaseService _messageAccess = MessageDatabaseService();
late BuildContext navigatorKey;
/// FIREBASE Messaging
void sendMessage(Message message, String idSender, String idReceiver) {
_messageAccess.sendMessage(message, idSender, idReceiver);
}
Stream<List<Message>> getMessage(String idSender, String idReceiver) {
return _messageAccess.getMessage(idSender, idReceiver);
}
void addUserConversation(String idSender, String idReceiver){
_messageAccess.addMessagingUser(idSender, idReceiver);
}
initUser() async {
await setCurrentMusic();
await setDiscoveries();
}
beginRoutine() async {
await setSpots();
Timer.periodic(const Duration(seconds: 10), (Timer t) => setSpots());
beginRoutine() {
Timer.periodic(const Duration(seconds: 20), (Timer t) => setSpots());
}
//
@ -48,14 +71,23 @@ class Controller {
await getCompleteMusic(await _api.requests.getCurrentlyPlayingTrack());
}
List<Spot> getSpots() => _data.spots;
List<Spot> getSpots() {
return _data.spots;
}
setSpots() async {
print('setspot');
_data.spots = await Location.sendCurrentLocation();
}
LinkedHashMap<Music, DateTime> getDiscoveries() => _data.discoveries;
void deleteDiscoveries(Music key) {
_data.discoveries.remove(key);
removeFromPlaylist(key.id);
}
setDiscoveries() async {
LinkedHashMap<String, DateTime> tmpData =
await _api.requests.getPlaylistTracks();
@ -93,8 +125,10 @@ class Controller {
_api.requests.removeFromPlaylist(id);
}
addToPlaylist(String id) {
addToPlaylist(String id) async {
_api.requests.addToPlaylist(id);
Music music = await getCompleteMusic(id);
_data.discoveries.addAll({music: DateTime.now()});
}
playTrack(String id) {
@ -113,6 +147,7 @@ class Controller {
return false;
}
_currentUser = newUser;
_currentUser.idSpotify = await _api.requests.getIdUser();
return true;
}

@ -6,6 +6,6 @@ import '../model/spot.dart';
class LiveData {
bool discoveriesSortChoice = true;
late LinkedHashMap<Music, DateTime> discoveries;
late List<Spot> spots;
List<Spot> spots = <Spot>[];
late Music userCurrentMusic;
}

@ -0,0 +1,69 @@
// File generated by FlutterFire CLI.
// ignore_for_file: lines_longer_than_80_chars, avoid_classes_with_only_static_members
import 'package:firebase_core/firebase_core.dart' show FirebaseOptions;
import 'package:flutter/foundation.dart'
show defaultTargetPlatform, kIsWeb, TargetPlatform;
/// Default [FirebaseOptions] for use with your Firebase apps.
///
/// Example:
/// ```dart
/// import 'firebase_options.dart';
/// // ...
/// await Firebase.initializeApp(
/// options: DefaultFirebaseOptions.currentPlatform,
/// );
/// ```
class DefaultFirebaseOptions {
static FirebaseOptions get currentPlatform {
if (kIsWeb) {
throw UnsupportedError(
'DefaultFirebaseOptions have not been configured for web - '
'you can reconfigure this by running the FlutterFire CLI again.',
);
}
switch (defaultTargetPlatform) {
case TargetPlatform.android:
return android;
case TargetPlatform.iOS:
return ios;
case TargetPlatform.macOS:
throw UnsupportedError(
'DefaultFirebaseOptions have not been configured for macos - '
'you can reconfigure this by running the FlutterFire CLI again.',
);
case TargetPlatform.windows:
throw UnsupportedError(
'DefaultFirebaseOptions have not been configured for windows - '
'you can reconfigure this by running the FlutterFire CLI again.',
);
case TargetPlatform.linux:
throw UnsupportedError(
'DefaultFirebaseOptions have not been configured for linux - '
'you can reconfigure this by running the FlutterFire CLI again.',
);
default:
throw UnsupportedError(
'DefaultFirebaseOptions are not supported for this platform.',
);
}
}
static const FirebaseOptions android = FirebaseOptions(
apiKey: 'AIzaSyBODcBh2wlcYBc0QCQKLKXA46uE64veSvA',
appId: '1:743783838712:android:34e4356470b8125ee51c0d',
messagingSenderId: '743783838712',
projectId: 'daflmusic-b36d2',
storageBucket: 'daflmusic-b36d2.appspot.com',
);
static const FirebaseOptions ios = FirebaseOptions(
apiKey: 'AIzaSyD2E7KNx6BNyn6U7FqDq65m-i66WXVyjYA',
appId: '1:743783838712:ios:d69f49090eb60fb9e51c0d',
messagingSenderId: '743783838712',
projectId: 'daflmusic-b36d2',
storageBucket: 'daflmusic-b36d2.appspot.com',
iosClientId: '743783838712-eqfakrghgk4grboprkebadoqe09k0002.apps.googleusercontent.com',
iosBundleId: 'com.example.daflProjectFlutter',
);
}

@ -8,12 +8,19 @@ import 'package:flutter/services.dart';
import 'package:provider/provider.dart';
import 'package:rive/rive.dart' as riv;
import '../controller/controller.dart';
import 'model/message.dart';
import 'model/spot.dart';
import 'dart:developer' as dev;
import 'package:flutter_styled_toast/flutter_styled_toast.dart';
import 'package:firebase_core/firebase_core.dart';
import 'firebase_options.dart';
void main() {
void main() async{
runApp(const MyApp());
await Firebase.initializeApp(
options: DefaultFirebaseOptions.currentPlatform,
);
}
class MyApp extends StatelessWidget {
@ -221,7 +228,7 @@ class CardProvider extends ChangeNotifier {
notifyListeners();
}
}
final messageTextField = TextEditingController();
void message(context) {
dev.log("message");
_angle = 0;
@ -243,7 +250,6 @@ class CardProvider extends ChangeNotifier {
}
Widget buildSheet(context) {
final messageTextField = TextEditingController();
return SingleChildScrollView(
padding:
EdgeInsets.only(bottom: MediaQuery.of(context).viewInsets.bottom),
@ -296,6 +302,7 @@ class CardProvider extends ChangeNotifier {
),
child: Padding(
padding: const EdgeInsets.all(20),
child: Form(
child: TextField(
keyboardAppearance: Brightness.dark,
controller: messageTextField,
@ -307,7 +314,6 @@ class CardProvider extends ChangeNotifier {
fontWeight: FontWeight.w200),
expands: true,
maxLines: null,
textInputAction: TextInputAction.send,
decoration: const InputDecoration(
hintStyle: TextStyle(
color: Colors.white,
@ -315,7 +321,9 @@ class CardProvider extends ChangeNotifier {
border: InputBorder.none,
hintText: "Mon message",
),
),
)
),
),
const SizedBox(
@ -357,8 +365,14 @@ class CardProvider extends ChangeNotifier {
);
}
void sendMessage(String message, String userId) {
dev.log(MyApp.controller.getSpots().last.userId);
void sendMessage(String content, String idReceiver) {
Message message = Message(idSender: MyApp.controller.getIdDafl(), idReceiver: idReceiver,
content: content, timestamp: DateTime.now().toString());
MyApp.controller.sendMessage(message, MyApp.controller.getIdDafl(),
idReceiver);
MyApp.controller.addUserConversation(MyApp.controller.getIdDafl(), idReceiver);
}
void like(context) {
@ -623,3 +637,5 @@ Object notify(int index, context, {bool isError = true}) {
)));
}
}

@ -1,8 +1,35 @@
import 'user.dart';
class Message {
String senderId;
String idSender;
String idReceiver;
String content;
String timestamp;
Message(this.senderId, this.content);
Message({required this.idSender,
required this.idReceiver,
required this.content,
required this.timestamp
});
Map<String, dynamic> toHashMap() {
return {
'idSender': idSender,
'idReceiver': idReceiver,
'content': content,
'timestamp' : timestamp
};
}
factory Message.fromMap(Map<String, dynamic> data){
return Message(
idSender: data['idSender'],
idReceiver: data['idReceiver'],
content: data['content'],
timestamp: data['timestamp']
);
}
}

@ -39,7 +39,7 @@ class DatabaseConnexion {
try {
var uri =
'postgres://$_psqlUser:$_psqlPswd@$_psqlHost:5442/$_psqlDataBase';
'postgres://$_psqlUser:$_psqlPswd@$_psqlHost:15739/$_psqlDataBase?sslmode=require';
return connect(uri);
} catch (e) {

@ -11,7 +11,7 @@ class DatabaseLoader implements Loader {
final connection = await DatabaseConnexion.initConnexion();
var queryResult = await connection
.query(
'select username from utilisateur where username = @username AND password = @password',
'select idDafl from users where idDafl = @username AND password = @password',
{'username': username, 'password': password})
.toList()
.then((result) {
@ -25,7 +25,6 @@ class DatabaseLoader implements Loader {
.whenComplete(() {
connection.close();
});
return queryResult;
}
}

@ -8,9 +8,10 @@ class DatabaseSaver implements Saver {
final connection = await DatabaseConnexion.initConnexion();
connection.execute(
'insert into utilisateur (username, password) values (@username, @password)',
'insert into users (idDafl, idSpotify, password) values (@username, 0, @password)',
{'id': '', 'username': idDafl, 'password': passw}).whenComplete(() {
connection.close();
});
print('save');
}
}

@ -10,7 +10,7 @@ class DatabaseSearcher implements Searcher {
final connection = await DatabaseConnexion.initConnexion();
bool queryResult = await connection
.query('select * from utilisateur where username = @username',
.query('select * from users where idDafl = @username',
{'username': username})
.toList()
.then((rows) {

@ -0,0 +1,80 @@
import 'package:dafl_project_flutter/model/message.dart';
import 'package:cloud_firestore/cloud_firestore.dart';
class MessageDatabaseService{
// Make an unique chat ID between 2 client. Look like 'User1-User2'
String _getChatId(String idSender, String idReceiver) {
// Test to always have the same id
if (idSender.hashCode <= idReceiver.hashCode)
return '$idSender-${idReceiver}';
else
return '${idReceiver}-$idSender';
}
// Send a message from an user to an other
void sendMessage(Message message, String idSender, String idReceiver) {
String chatId = _getChatId(idSender, idReceiver);
// Get a message from a snapshot Firestore
var documentReference = FirebaseFirestore.instance
.collection('messages')
.doc(chatId)
.collection(chatId)
.doc(DateTime
.now()
.millisecondsSinceEpoch
.toString());
FirebaseFirestore.instance.runTransaction((transaction) async {
transaction.set(documentReference, message.toHashMap());
});
}
Message _getMessage(DocumentSnapshot<Map<String, dynamic>> snapshot) {
var data = snapshot.data();
if (data == null)
throw Exception("no data in database");
return Message.fromMap(data);
}
// Get a list of messages from Firestore
List<Message> _getAllMessages(QuerySnapshot<Map<String, dynamic>> snapshot) {
return snapshot.docs.map((doc) {
return _getMessage(doc);
}).toList();
}
// Get the massages from Firestore
Stream<List<Message>> getMessage(String idSender, String idReceiver) {
String chatId = _getChatId(idSender, idReceiver);
return FirebaseFirestore.instance
.collection('messages')
.doc(chatId)
.collection(chatId)
.orderBy('timestamp', descending: true)
.snapshots().map(_getAllMessages);
}
void addMessagingUser(String idSender, String idReceiver) {
// Get a message from a snapshot Firestore
var documentReference = FirebaseFirestore.instance
.collection('users')
.doc(idSender)
.collection(idSender)
.doc(DateTime
.now()
.millisecondsSinceEpoch
.toString());
Map<String, dynamic> receiver = { 'user' : idReceiver };
FirebaseFirestore.instance.runTransaction((transaction) async {
transaction.set(documentReference, receiver);
});
}
}

@ -1,3 +1,5 @@
import 'dart:developer';
import 'package:dafl_project_flutter/model/spot.dart';
import 'package:geolocator/geolocator.dart';
import 'package:http/http.dart' as http;
@ -8,7 +10,7 @@ import '../../main.dart';
class Location {
static Future<List<Spot>> sendCurrentLocation() async {
Uri uri = Uri.parse(
"https://codefirst.iut.uca.fr/containers/php_script-dorianhodin/insertAndMakeListUser.php");
"https://codefirst.iut.uca.fr/containers/DAFLDev-php_script/insertAndMakeListUser.php");
LocationPermission permission = await Geolocator.checkPermission();
if (permission == LocationPermission.denied) {
@ -29,7 +31,7 @@ class Location {
"longitude": current.longitude.toString(),
"idMusic": actualSong,
});
log("echo");
var data = jsonDecode(response.body);
Map<String, String> spotsData = {};
List<Spot> spots = [];

@ -5,28 +5,36 @@ import 'package:dafl_project_flutter/model/message.dart';
import 'dart:developer' as dev;
class ConversationPage extends StatefulWidget {
const ConversationPage({Key? key}) : super(key: key);
String sender;
ConversationPage({Key? key, required String this.sender}) : super(key: key);
@override
State<ConversationPage> createState() => _ConversationPageState();
State<ConversationPage> createState() => _ConversationPageState(sender);
}
class _ConversationPageState extends State<ConversationPage> {
String destinataire = 'test';
List<Widget> messages = [];
bool isNull = true;
final String receiver;
_ConversationPageState(this.receiver);
final messageTextField = TextEditingController();
void sendMessage(String content) {
void sendMessage(String content, String idSender, String idReceiver) {
Message messageToSend = Message(idSender: idSender, idReceiver: idReceiver, content: content, timestamp: DateTime.now().toString());
MyApp.controller.sendMessage(messageToSend, idSender, idReceiver);
setState(() {
messages.add(messageWidget(
Message(MyApp.controller.getIdDafl().toString(), content)));
messages.add(messageWidget(messageToSend));
});
}
Widget messageWidget(Message message) {
if (message.senderId != MyApp.controller.getIdDafl().toString()) {
if (message.idSender != MyApp.controller.getIdDafl()) {
return Align(
alignment: Alignment.centerLeft,
child: Container(
@ -116,7 +124,8 @@ class _ConversationPageState extends State<ConversationPage> {
ScrollController listScrollController = ScrollController();
return Scaffold(
extendBodyBehindAppBar: true,
extendBodyBehindAppBar: false,
extendBody: false,
resizeToAvoidBottomInset: true,
appBar: AppBar(
elevation: 20,
@ -130,13 +139,14 @@ class _ConversationPageState extends State<ConversationPage> {
width: 40,
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(40),
color: Colors.blue,
),
child: Image.asset('assets/images/DaflUser_profil.png'),
),
const SizedBox(
width: 20,
),
const Text("Max"),
Text(receiver),
const Spacer(),
IconButton(
splashColor: Colors.grey.withOpacity(0.2),
@ -165,18 +175,34 @@ class _ConversationPageState extends State<ConversationPage> {
),
),
body: SingleChildScrollView(
physics: const ScrollPhysics(),
child: Container(
color: const Color(0xFF141414),
height: height * 0.92,
height: height * 0.85,
width: double.infinity,
child: ListView.builder(
child: Flexible(
child: StreamBuilder<List<Message>>(
stream: MyApp.controller.getMessage(MyApp.controller.getIdDafl(), receiver),
builder: (BuildContext context,
AsyncSnapshot<List<Message>> snapshot) {
if (snapshot.hasData) {
List<Message> listMessage =
snapshot.data ?? List.from([]);
return ListView.builder(
padding: EdgeInsets.all(10.0),
itemCount: listMessage.length,
itemBuilder: (context, index) =>
messageWidget(listMessage[index]),
reverse: true,
controller: listScrollController,
physics: const BouncingScrollPhysics(),
itemCount: messages.length,
itemBuilder: (context, index) {
return messages[index];
})),
);
} else {
return Center(child: Container());
}
},
),
))),
bottomSheet: BottomAppBar(
color: const Color(0xFF141414),
child: Row(
@ -186,7 +212,7 @@ class _ConversationPageState extends State<ConversationPage> {
Container(
height: height * 0.08,
color: Colors.transparent,
width: width * 0.9,
width: width * 0.8,
child: Container(
margin: const EdgeInsets.fromLTRB(10, 10, 10, 10),
decoration: BoxDecoration(
@ -218,10 +244,13 @@ class _ConversationPageState extends State<ConversationPage> {
onTap: isNull
? null
: () {
sendMessage(messageTextField.text);
sendMessage(
messageTextField.text,
MyApp.controller.getIdDafl(),
receiver);
if (listScrollController.hasClients) {
final position =
listScrollController.position.maxScrollExtent;
listScrollController.position.minScrollExtent;
listScrollController.jumpTo(position);
}
messageTextField.clear();
@ -256,9 +285,9 @@ class _ConversationPageState extends State<ConversationPage> {
),
);
}
final messageReportTextField = TextEditingController();
Widget buildSheet() {
final messageTextField = TextEditingController();
return SingleChildScrollView(
padding:
EdgeInsets.only(bottom: MediaQuery.of(context).viewInsets.bottom),
@ -345,7 +374,7 @@ class _ConversationPageState extends State<ConversationPage> {
borderRadius: BorderRadius.circular(15),
),
child: TextField(
controller: messageTextField,
controller: messageReportTextField,
keyboardAppearance: Brightness.dark,
style: TextStyle(
fontFamily: 'DMSans',
@ -376,9 +405,9 @@ class _ConversationPageState extends State<ConversationPage> {
onPressed: () {
MyApp.controller.sendEmail(
MyApp.controller.getIdDafl().toString(),
destinataire,
receiver,
currentValue,
messageTextField.text);
messageReportTextField.text);
Navigator.pop(context);
},
style: ElevatedButton.styleFrom(

@ -1,4 +1,5 @@
import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
import '../../../main.dart';
import '../../presentation/custom_icons_icons.dart';
import './w_settings.dart';
@ -36,6 +37,7 @@ class _MainPageState extends State<MainPage> {
@override
Widget build(BuildContext context) {
SystemChrome.setEnabledSystemUIMode (SystemUiMode.immersive);
double height = MediaQuery.of(context).size.height;
return Scaffold(
resizeToAvoidBottomInset: false,
@ -48,8 +50,8 @@ class _MainPageState extends State<MainPage> {
),
child: ConstrainedBox(
constraints: const BoxConstraints(
minHeight: 100,
maxHeight: 100,
minHeight: 80,
maxHeight: 80,
),
child: NavigationBar(
animationDuration: const Duration(microseconds: 800),

@ -1,7 +1,7 @@
import 'dart:collection';
import 'package:dafl_project_flutter/main.dart';
import 'package:flutter/material.dart';
import 'package:scroll_loop_auto_scroll/scroll_loop_auto_scroll.dart';
import 'dart:developer' as dev;
import '../../../model/music.dart';
@ -14,6 +14,13 @@ class DiscoveryWidget extends StatefulWidget {
}
class _DiscoveryWidgetState extends State<DiscoveryWidget> {
@override
initState() {
MyApp.controller.getDiscoveries();
super.initState();
}
@override
Widget build(BuildContext context) {
return Container(
@ -113,12 +120,13 @@ class _DiscoveryListState extends State<DiscoveryList> {
}
refreshList() async {
await Future.delayed(const Duration(seconds: 1));
await Future.delayed(const Duration(seconds: 3));
setState(() {});
}
@override
Widget build(BuildContext context) {
double width = MediaQuery.of(context).size.width;
late LinkedHashMap<Music, DateTime> listDiscoveries;
if (MyApp.controller.getChoice()) {
//TODO : implement sort by date
@ -155,9 +163,8 @@ class _DiscoveryListState extends State<DiscoveryList> {
dev.log(listDiscoveries.keys.toList()[reversedIndex].id);
dev.log(
listDiscoveries.keys.toList()[reversedIndex].name);
MyApp.controller.removeFromPlaylist(
listDiscoveries.keys.toList()[reversedIndex].id);
listDiscoveries = MyApp.controller.getDiscoveries();
MyApp.controller.deleteDiscoveries(
listDiscoveries.keys.toList()[reversedIndex]);
return true;
}
if (direction == DismissDirection.startToEnd) {
@ -218,7 +225,38 @@ class _DiscoveryListState extends State<DiscoveryList> {
mainAxisAlignment:
MainAxisAlignment.center,
children: [
Text(
MyApp.controller
.getDiscoveries()
.keys
.toList()[reversedIndex]
.name
.length >
22
? SizedBox(
width: width * 0.60,
child: ScrollLoopAutoScroll(
delayAfterScrollInput:
Duration(seconds: 1),
delay: Duration(seconds: 1),
child: Text(
MyApp.controller
.getDiscoveries()
.keys
.toList()[reversedIndex]
.name,
style: TextStyle(
fontSize: 20,
color: Colors.white,
fontWeight:
FontWeight.bold),
),
duration:
Duration(seconds: 100),
scrollDirection:
Axis.horizontal,
),
)
: Text(
MyApp.controller
.getDiscoveries()
.keys
@ -226,10 +264,11 @@ class _DiscoveryListState extends State<DiscoveryList> {
.name,
style: TextStyle(
fontFamily: 'DMSans',
color:
Colors.white.withOpacity(1),
color: Colors.white
.withOpacity(1),
fontSize: 20,
fontWeight: FontWeight.w800),
fontWeight:
FontWeight.w800),
),
Text(
MyApp.controller

@ -1,3 +1,5 @@
import 'package:cloud_firestore/cloud_firestore.dart';
import 'package:dafl_project_flutter/main.dart';
import 'package:flutter/material.dart';
import 'package:page_transition/page_transition.dart';
@ -65,7 +67,7 @@ class _MessagesWidgetState extends State<MessagesWidget> {
color: Colors.grey.withOpacity(0.4), fontSize: 15),
),
Padding(
padding: EdgeInsets.fromLTRB(0, height * 0.01, 0, 0),
padding: EdgeInsets.fromLTRB(0, height * 0.01, 0, height * 0.01),
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceAround,
children: [
@ -131,7 +133,10 @@ class _MessagesWidgetState extends State<MessagesWidget> {
}
class MessagesButtonWidget extends StatelessWidget {
const MessagesButtonWidget({super.key});
final String sender;
const MessagesButtonWidget({super.key, required this.sender});
@override
Widget build(BuildContext context) {
@ -150,8 +155,7 @@ class MessagesButtonWidget extends StatelessWidget {
width: 60,
decoration: BoxDecoration(
image: const DecorationImage(
image: NetworkImage(
'https://www.goutemesdisques.com/uploads/tx_gmdchron/pi1/L_Etrange_Histoire_de_Mr_Anderson.jpg'),
image: AssetImage('assets/images/DaflUser_profil.png'),
fit: BoxFit.cover,
),
border: Border.all(
@ -171,7 +175,7 @@ class MessagesButtonWidget extends StatelessWidget {
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Text(
'Max',
sender,
style: TextStyle(
fontFamily: 'DMSans',
color: Colors.white.withOpacity(1),
@ -207,17 +211,48 @@ class MessagesButtonWidget extends StatelessWidget {
}
}
class ListConfirmedWidget extends StatelessWidget {
const ListConfirmedWidget({super.key});
@override
Widget build(BuildContext context) {
return ListView(children: const [
MessagesButtonWidget(),
MessagesButtonWidget(),
MessagesButtonWidget(),
MessagesButtonWidget(),
]);
return StreamBuilder<QuerySnapshot<Map<String, dynamic>>>(
stream: FirebaseFirestore.instance
.collection('users')
.doc(MyApp.controller.getIdDafl())
.collection(MyApp.controller.getIdDafl())
.snapshots(),
builder: (_, snapshot) {
if (snapshot.hasError) return Text('Error = ${snapshot.error}');
if (snapshot.hasData) {
final docs = snapshot.data!.docs;
return ListView.builder(
itemCount: docs.length,
itemBuilder: (context, i) {
final data = docs[i].data();
return GestureDetector(
onTap: () {
Navigator.of(context).push(PageTransition(
duration: const Duration(milliseconds: 200),
reverseDuration: const Duration(milliseconds: 200),
type: PageTransitionType.rightToLeftWithFade,
childCurrent: context.widget,
child: ConversationPage(sender : data['user'])));
},
child: MessagesButtonWidget(sender : data['user'])
);
},
);
}
return Center(child: CircularProgressIndicator());
},
);
}
}
@ -226,6 +261,7 @@ class ListWaitingWidget extends StatelessWidget {
@override
Widget build(BuildContext context) {
return ListView(
children: [
GestureDetector(
@ -235,11 +271,13 @@ class ListWaitingWidget extends StatelessWidget {
reverseDuration: const Duration(milliseconds: 200),
type: PageTransitionType.rightToLeftWithFade,
childCurrent: context.widget,
child: const ConversationPage()));
child: ConversationPage(sender :'test')));
},
child: const MessagesButtonWidget(),
child: const MessagesButtonWidget(sender : "test6"),
),
],
);
}
}

@ -1,4 +1,7 @@
import 'package:scroll_loop_auto_scroll/scroll_loop_auto_scroll.dart';
import '../../../main.dart';
import '../../../model/music.dart';
import './w_settings.dart';
import './w_spot.dart';
import 'package:flutter/material.dart';
@ -30,12 +33,14 @@ class _MainPageProfilState extends State<MainPageProfil> {
@override
initState() {
MyApp.controller.setCurrentMusic();
username = MyApp.controller.getIdDafl();
super.initState();
}
@override
Widget build(BuildContext context) {
double width = MediaQuery.of(context).size.width;
double height = MediaQuery.of(context).size.height;
return Container(
color: const Color(0xFF141414),
@ -218,31 +223,112 @@ class _MainPageProfilState extends State<MainPageProfil> {
child: riv.RiveAnimation.asset(
'assets/images/playing_animation.riv')))
]),
Container(
margin: const EdgeInsets.fromLTRB(0, 10, 0, 0),
FutureBuilder(
future: MyApp.controller.getCompleteMusic(
MyApp.controller.getCurrentMusic().id),
builder: (BuildContext context,
AsyncSnapshot<Music> snapshot) {
print(snapshot.connectionState);
if (snapshot.connectionState ==
ConnectionState.waiting) {
return Container(
margin:
const EdgeInsets.fromLTRB(0, 10, 0, 0),
height: height * 0.14,
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(15.0),
color: const Color(0xFFD9D9D9).withOpacity(0.08),
color: const Color(0xFFD9D9D9)
.withOpacity(0.08),
),
child: Row(
mainAxisAlignment: MainAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.center,
crossAxisAlignment:
CrossAxisAlignment.center,
children: [
Container(
margin: const EdgeInsets.fromLTRB(
15, 0, 0, 0),
child: ClipRRect(
borderRadius:
BorderRadius.circular(15),
BorderRadius.circular(10),
child: Image.asset(
"assets/images/loadingPlaceholder.gif",
height: 90,
width: 90))),
Container(
margin: const EdgeInsets.fromLTRB(
12, 20, 0, 0),
child: Column(
mainAxisAlignment:
MainAxisAlignment.start,
crossAxisAlignment:
CrossAxisAlignment.start,
children: [
Container(
width: 150,
height: 20,
decoration: BoxDecoration(
borderRadius:
BorderRadius.circular(5.0),
color: Colors.grey
.withOpacity(0.7),
),
),
SizedBox(
height: 10,
),
Container(
width: 100,
height: 20,
decoration: BoxDecoration(
borderRadius:
BorderRadius.circular(5.0),
color: Colors.grey
.withOpacity(0.4),
),
),
],
),
)
],
),
);
} else if (snapshot.connectionState ==
ConnectionState.done) {
if (snapshot.hasError) {
return const Text('Error');
} else if (snapshot.hasData) {
return Container(
margin: const EdgeInsets.fromLTRB(
0, 10, 0, 0),
height: height * 0.14,
decoration: BoxDecoration(
borderRadius:
BorderRadius.circular(15.0),
color: const Color(0xFFD9D9D9)
.withOpacity(0.08),
),
child: Row(
mainAxisAlignment:
MainAxisAlignment.start,
crossAxisAlignment:
CrossAxisAlignment.center,
children: [
Container(
margin:
const 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: MyApp.controller
.getCurrentMusic()
.linkCover))),
image: snapshot
.data!.linkCover))),
Container(
margin: const EdgeInsets.fromLTRB(
12, 20, 0, 0),
@ -252,47 +338,83 @@ class _MainPageProfilState extends State<MainPageProfil> {
crossAxisAlignment:
CrossAxisAlignment.start,
children: [
Text(
MyApp.controller
.getCurrentMusic()
.name,
style: const TextStyle(
fontSize: 18,
fontWeight: FontWeight.w500,
color: Colors.white),
snapshot.data!.name.length >
22
? SizedBox(
width: width*0.5,
child:
ScrollLoopAutoScroll(
delayAfterScrollInput:
Duration(
seconds: 1),
delay: Duration(
seconds: 1),
child: Text(
snapshot
.data!.name,
style: TextStyle(
fontSize: 20,
color: Colors
.white,
fontWeight:
FontWeight
.bold),
),
duration: Duration(
seconds: 100),
scrollDirection:
Axis.horizontal,
),
)
: Text(
snapshot.data!.name,
style: TextStyle(
fontSize: 20,
color:
Colors.white,
fontWeight:
FontWeight
.bold),
),
Text(
MyApp.controller
.getCurrentMusic()
.artist,
snapshot.data!.artist,
style: const TextStyle(
fontSize: 16,
fontWeight: FontWeight.w400,
color: Colors.grey))
fontWeight:
FontWeight.w400,
color: Colors.grey),
),
],
),
)
]));
} else {
return const Text('Empty data');
}
} else {
return Text(
'State: ${snapshot.connectionState}');
}
}),
])),
const Spacer(),
Container(
height: 55,
width: double.infinity,
decoration: BoxDecoration(
borderRadius:
BorderRadius.circular(10.0),
borderRadius: BorderRadius.circular(10.0),
color: Colors.transparent,
),
margin: const EdgeInsets.fromLTRB(
30, 0, 30, 0),
margin: const EdgeInsets.fromLTRB(30, 0, 30, 0),
child: SizedBox(
height: 55,
width: double.infinity,
child: ElevatedButton(
style: ElevatedButton.styleFrom(
backgroundColor:
const Color(0xFFD9D9D9)
.withOpacity(0.08),
const Color(0xFFD9D9D9).withOpacity(0.08),
shape: RoundedRectangleBorder(
borderRadius:
BorderRadius.circular(
10.0),
borderRadius: BorderRadius.circular(10.0),
), // background// foreground
),
onPressed: () {
@ -300,14 +422,7 @@ class _MainPageProfilState extends State<MainPageProfil> {
context,
MaterialPageRoute(
builder: (context) =>
const SettingsWidget()))
.then(
(value) => setState(() {
username = MyApp
.controller
.getIdDafl()
.toString();
}));
const SettingsWidget()));
},
child: Row(children: [
const Icon(
@ -323,20 +438,16 @@ class _MainPageProfilState extends State<MainPageProfil> {
style: TextStyle(
color: Colors.white,
fontSize: 17,
fontWeight:
FontWeight.w400),
fontWeight: FontWeight.w400),
textAlign: TextAlign.center,
),
const Spacer(),
Icon(
Icons.arrow_forward_ios,
color: Colors.white
.withOpacity(0.3),
color: Colors.white.withOpacity(0.3),
)
])))),
const Spacer()
]))
]))
])));
}
}

@ -16,6 +16,8 @@ class SpotsWidget extends StatefulWidget {
}
class _SpotsWidgetState extends State<SpotsWidget> {
@override
Widget build(BuildContext context) {
double height = MediaQuery.of(context).size.height;
@ -233,8 +235,8 @@ class _SpotsWidgetState extends State<SpotsWidget> {
child: SizedBox(
height: 40,
child: MyApp.controller.getSpots().isEmpty
? Image.asset("assets/images/play_spotify_button.png")
: Container(),
? Container()
: Image.asset("assets/images/play_spotify_button.png"),
),
))
],

@ -196,26 +196,8 @@ class _SignUpPageState extends State<SignUpPage> {
padding: const EdgeInsets.fromLTRB(45, 10, 45, 0),
child: Stack(
children: [
Container(
height: 43,
decoration: BoxDecoration(
color: const Color(0xFF24CF5F),
borderRadius:
const BorderRadius.all(Radius.circular(50)),
boxShadow: [
BoxShadow(
color: Colors.black.withOpacity(0.3),
spreadRadius: 5,
blurRadius: 7,
offset: const Offset(
0, 3), // changes position of shadow
),
],
),
),
SizedBox(
height: 43,
width: width * 0.75,
child: ElevatedButton(
style: ElevatedButton.styleFrom(
backgroundColor: const Color(0xFF24CF5F),
@ -336,15 +318,16 @@ class _SignUpPageState extends State<SignUpPage> {
} else if (!await MyApp.controller.searchUser(username)) {
notify(0, context);
}
if (password == "" || confirmPassword == "") {
else if (password == "" || confirmPassword == "") {
notify(4, context);
} else if (password.length < 8) {
notify(3, context);
} else if (password != confirmPassword) {
notify(1, context);
} else {
MyApp.controller.save(username, password);
// create user in database
print("success");
Navigator.of(context).push(
PageTransition(
duration: const Duration(milliseconds: 300),

@ -1,6 +1,13 @@
# Generated by pub
# See https://dart.dev/tools/pub/glossary#lockfile
packages:
_flutterfire_internals:
dependency: transitive
description:
name: _flutterfire_internals
url: "https://pub.dartlang.org"
source: hosted
version: "1.0.12"
animations:
dependency: "direct main"
description:
@ -71,6 +78,27 @@ packages:
url: "https://pub.dartlang.org"
source: hosted
version: "1.1.1"
cloud_firestore:
dependency: "direct main"
description:
name: cloud_firestore
url: "https://pub.dartlang.org"
source: hosted
version: "4.3.1"
cloud_firestore_platform_interface:
dependency: transitive
description:
name: cloud_firestore_platform_interface
url: "https://pub.dartlang.org"
source: hosted
version: "5.10.1"
cloud_firestore_web:
dependency: transitive
description:
name: cloud_firestore_web
url: "https://pub.dartlang.org"
source: hosted
version: "3.2.1"
collection:
dependency: transitive
description:
@ -134,6 +162,48 @@ packages:
url: "https://pub.dartlang.org"
source: hosted
version: "6.1.4"
firebase_core:
dependency: "direct main"
description:
name: firebase_core
url: "https://pub.dartlang.org"
source: hosted
version: "2.4.1"
firebase_core_platform_interface:
dependency: transitive
description:
name: firebase_core_platform_interface
url: "https://pub.dartlang.org"
source: hosted
version: "4.5.2"
firebase_core_web:
dependency: transitive
description:
name: firebase_core_web
url: "https://pub.dartlang.org"
source: hosted
version: "2.1.0"
firebase_messaging:
dependency: "direct main"
description:
name: firebase_messaging
url: "https://pub.dartlang.org"
source: hosted
version: "14.2.1"
firebase_messaging_platform_interface:
dependency: transitive
description:
name: firebase_messaging_platform_interface
url: "https://pub.dartlang.org"
source: hosted
version: "4.2.10"
firebase_messaging_web:
dependency: transitive
description:
name: firebase_messaging_web
url: "https://pub.dartlang.org"
source: hosted
version: "3.2.11"
flutter:
dependency: "direct main"
description: flutter

@ -32,6 +32,9 @@ dependencies:
marquee: ^2.2.3
text_scroll: ^0.1.1
scroll_loop_auto_scroll: ^0.0.2
firebase_core: ^2.4.1
firebase_messaging: ^14.1.1
cloud_firestore: ^4.1.0
dev_dependencies:
flutter_test:

@ -33,7 +33,7 @@ function insertUserAndReturnList(): array|int
latitude double NOT NULL,
longitude double NOT NULL,
idMusic varchar(100) NOT NULL,
dateLog date NOT NULL
dateLog datetime NOT NULL
);";
mysqli_query($res, $query);

Loading…
Cancel
Save