merge with master
continuous-integration/drone/push Build is failing Details

DEPLOY
Emre KARTAL 1 year ago
commit f888dbfa3c

BIN
.DS_Store vendored

Binary file not shown.

@ -7,14 +7,28 @@ trigger:
- push
steps:
# - name: app-build
# image: cirrusci/flutter:stable
# commands:
# - cd ./Sources/justMUSIC/
# - flutter build apk
- name: app-build
image: ghcr.io/cirruslabs/flutter:3.13.9
commands:
- cd ./Sources/justMUSIC/
- flutter build apk
- name: build-web
image: ghcr.io/cirruslabs/flutter:3.13.9
environment:
FIREBASE_TOKEN:
from_secret: FIREBASE_TOKEN
commands:
- cd ./Sources/justMUSIC/
- flutter build web --web-renderer canvaskit
- curl -sL https://firebase.tools | bash
- firebase deploy --token $${FIREBASE_TOKEN}
when:
branch:
- PROD-WEB
- name: code-analysis
image: cirrusci/flutter:stable
image: ghcr.io/cirruslabs/flutter:3.13.9
environment:
SONAR_TOKEN:
from_secret: SONAR_TOKEN
@ -26,3 +40,4 @@ steps:
- export PATH=$SONAR_SCANNER_HOME/bin:$PATH
- export SONAR_SCANNER_OPTS="-server"
- sonar-scanner -D sonar.projectKey=JustMusic -D sonar.sources=./Sources/justMUSIC -D sonar.host.url=https://codefirst.iut.uca.fr/sonar
ddepends_on: [app-build]

@ -81,6 +81,75 @@
<excludeFolder url="file://$MODULE_DIR$/Sources/justmusic/ios/.symlinks/plugins/flutter_keyboard_visibility/.pub" />
<excludeFolder url="file://$MODULE_DIR$/Sources/justmusic/ios/.symlinks/plugins/flutter_keyboard_visibility/build" />
<excludeFolder url="file://$MODULE_DIR$/Sources/justmusic/ios/.symlinks/plugins/flutter_keyboard_visibility/.dart_tool" />
<excludeFolder url="file://$MODULE_DIR$/Sources/justMUSIC/ios/.symlinks/plugins/firebase_storage/.pub" />
<excludeFolder url="file://$MODULE_DIR$/Sources/justMUSIC/ios/.symlinks/plugins/firebase_storage/build" />
<excludeFolder url="file://$MODULE_DIR$/Sources/justMUSIC/ios/.symlinks/plugins/firebase_storage/.dart_tool" />
<excludeFolder url="file://$MODULE_DIR$/Sources/justMUSIC/ios/.symlinks/plugins/cloud_firestore/example/.pub" />
<excludeFolder url="file://$MODULE_DIR$/Sources/justMUSIC/ios/.symlinks/plugins/cloud_firestore/example/.dart_tool" />
<excludeFolder url="file://$MODULE_DIR$/Sources/justMUSIC/ios/.symlinks/plugins/cloud_firestore/example/build" />
<excludeFolder url="file://$MODULE_DIR$/Sources/justMUSIC/ios/.symlinks/plugins/firebase_auth/.pub" />
<excludeFolder url="file://$MODULE_DIR$/Sources/justMUSIC/ios/.symlinks/plugins/firebase_auth/build" />
<excludeFolder url="file://$MODULE_DIR$/Sources/justMUSIC/ios/.symlinks/plugins/firebase_auth/.dart_tool" />
<excludeFolder url="file://$MODULE_DIR$/Sources/justMUSIC/ios/.symlinks/plugins/path_provider_foundation/build" />
<excludeFolder url="file://$MODULE_DIR$/Sources/justMUSIC/ios/.symlinks/plugins/path_provider_foundation/.pub" />
<excludeFolder url="file://$MODULE_DIR$/Sources/justMUSIC/ios/.symlinks/plugins/path_provider_foundation/.dart_tool" />
<excludeFolder url="file://$MODULE_DIR$/Sources/justMUSIC/ios/.symlinks/plugins/firebase_auth/example/.dart_tool" />
<excludeFolder url="file://$MODULE_DIR$/Sources/justMUSIC/ios/.symlinks/plugins/firebase_auth/example/.pub" />
<excludeFolder url="file://$MODULE_DIR$/Sources/justMUSIC/ios/.symlinks/plugins/firebase_auth/example/build" />
<excludeFolder url="file://$MODULE_DIR$/Sources/justMUSIC/ios/.symlinks/plugins/google_sign_in_ios/example/.dart_tool" />
<excludeFolder url="file://$MODULE_DIR$/Sources/justMUSIC/ios/.symlinks/plugins/google_sign_in_ios/example/.pub" />
<excludeFolder url="file://$MODULE_DIR$/Sources/justMUSIC/ios/.symlinks/plugins/google_sign_in_ios/example/build" />
<excludeFolder url="file://$MODULE_DIR$/Sources/justMUSIC/ios/.symlinks/plugins/audioplayers_darwin/.pub" />
<excludeFolder url="file://$MODULE_DIR$/Sources/justMUSIC/ios/.symlinks/plugins/audioplayers_darwin/.dart_tool" />
<excludeFolder url="file://$MODULE_DIR$/Sources/justMUSIC/ios/.symlinks/plugins/audioplayers_darwin/build" />
<excludeFolder url="file://$MODULE_DIR$/Sources/justMUSIC/ios/.symlinks/plugins/firebase_storage/example/.pub" />
<excludeFolder url="file://$MODULE_DIR$/Sources/justMUSIC/ios/.symlinks/plugins/firebase_storage/example/build" />
<excludeFolder url="file://$MODULE_DIR$/Sources/justMUSIC/ios/.symlinks/plugins/firebase_storage/example/.dart_tool" />
<excludeFolder url="file://$MODULE_DIR$/Sources/justMUSIC/ios/.symlinks/plugins/geolocator_apple/.pub" />
<excludeFolder url="file://$MODULE_DIR$/Sources/justMUSIC/ios/.symlinks/plugins/geolocator_apple/.dart_tool" />
<excludeFolder url="file://$MODULE_DIR$/Sources/justMUSIC/ios/.symlinks/plugins/geolocator_apple/build" />
<excludeFolder url="file://$MODULE_DIR$/Sources/justMUSIC/ios/.symlinks/plugins/flutter_keyboard_visibility/.dart_tool" />
<excludeFolder url="file://$MODULE_DIR$/Sources/justMUSIC/ios/.symlinks/plugins/flutter_keyboard_visibility/.pub" />
<excludeFolder url="file://$MODULE_DIR$/Sources/justMUSIC/ios/.symlinks/plugins/flutter_keyboard_visibility/build" />
<excludeFolder url="file://$MODULE_DIR$/Sources/justMUSIC/ios/.symlinks/plugins/sqflite/example/build" />
<excludeFolder url="file://$MODULE_DIR$/Sources/justMUSIC/ios/.symlinks/plugins/sqflite/example/.dart_tool" />
<excludeFolder url="file://$MODULE_DIR$/Sources/justMUSIC/ios/.symlinks/plugins/sqflite/example/.pub" />
<excludeFolder url="file://$MODULE_DIR$/Sources/justMUSIC/ios/.symlinks/plugins/firebase_messaging/.dart_tool" />
<excludeFolder url="file://$MODULE_DIR$/Sources/justMUSIC/ios/.symlinks/plugins/firebase_messaging/build" />
<excludeFolder url="file://$MODULE_DIR$/Sources/justMUSIC/ios/.symlinks/plugins/firebase_messaging/.pub" />
<excludeFolder url="file://$MODULE_DIR$/Sources/justMUSIC/ios/.symlinks/plugins/firebase_core/example/.dart_tool" />
<excludeFolder url="file://$MODULE_DIR$/Sources/justMUSIC/ios/.symlinks/plugins/firebase_core/example/.pub" />
<excludeFolder url="file://$MODULE_DIR$/Sources/justMUSIC/ios/.symlinks/plugins/firebase_core/example/build" />
<excludeFolder url="file://$MODULE_DIR$/Sources/justMUSIC/ios/.symlinks/plugins/flutter_keyboard_visibility/example/.pub" />
<excludeFolder url="file://$MODULE_DIR$/Sources/justMUSIC/ios/.symlinks/plugins/flutter_keyboard_visibility/example/.dart_tool" />
<excludeFolder url="file://$MODULE_DIR$/Sources/justMUSIC/ios/.symlinks/plugins/flutter_keyboard_visibility/example/build" />
<excludeFolder url="file://$MODULE_DIR$/Sources/justMUSIC/ios/.symlinks/plugins/firebase_messaging/example/.dart_tool" />
<excludeFolder url="file://$MODULE_DIR$/Sources/justMUSIC/ios/.symlinks/plugins/firebase_messaging/example/.pub" />
<excludeFolder url="file://$MODULE_DIR$/Sources/justMUSIC/ios/.symlinks/plugins/firebase_messaging/example/build" />
<excludeFolder url="file://$MODULE_DIR$/Sources/justMUSIC/ios/.symlinks/plugins/firebase_core/.pub" />
<excludeFolder url="file://$MODULE_DIR$/Sources/justMUSIC/ios/.symlinks/plugins/firebase_core/build" />
<excludeFolder url="file://$MODULE_DIR$/Sources/justMUSIC/ios/.symlinks/plugins/firebase_core/.dart_tool" />
<excludeFolder url="file://$MODULE_DIR$/Sources/justMUSIC/ios/.symlinks/plugins/sqflite/.pub" />
<excludeFolder url="file://$MODULE_DIR$/Sources/justMUSIC/ios/.symlinks/plugins/sqflite/build" />
<excludeFolder url="file://$MODULE_DIR$/Sources/justMUSIC/ios/.symlinks/plugins/sqflite/.dart_tool" />
<excludeFolder url="file://$MODULE_DIR$/Sources/justMUSIC/ios/.symlinks/plugins/cloud_firestore/.pub" />
<excludeFolder url="file://$MODULE_DIR$/Sources/justMUSIC/ios/.symlinks/plugins/cloud_firestore/build" />
<excludeFolder url="file://$MODULE_DIR$/Sources/justMUSIC/ios/.symlinks/plugins/cloud_firestore/.dart_tool" />
<excludeFolder url="file://$MODULE_DIR$/Sources/justMUSIC/ios/.symlinks/plugins/image_picker_ios/example/.pub" />
<excludeFolder url="file://$MODULE_DIR$/Sources/justMUSIC/ios/.symlinks/plugins/image_picker_ios/example/.dart_tool" />
<excludeFolder url="file://$MODULE_DIR$/Sources/justMUSIC/ios/.symlinks/plugins/image_picker_ios/example/build" />
<excludeFolder url="file://$MODULE_DIR$/Sources/justMUSIC/ios/.symlinks/plugins/image_picker_ios/build" />
<excludeFolder url="file://$MODULE_DIR$/Sources/justMUSIC/ios/.symlinks/plugins/image_picker_ios/.pub" />
<excludeFolder url="file://$MODULE_DIR$/Sources/justMUSIC/ios/.symlinks/plugins/image_picker_ios/.dart_tool" />
<excludeFolder url="file://$MODULE_DIR$/Sources/justMUSIC/ios/.symlinks/plugins/google_sign_in_ios/build" />
<excludeFolder url="file://$MODULE_DIR$/Sources/justMUSIC/ios/.symlinks/plugins/google_sign_in_ios/.dart_tool" />
<excludeFolder url="file://$MODULE_DIR$/Sources/justMUSIC/ios/.symlinks/plugins/google_sign_in_ios/.pub" />
<excludeFolder url="file://$MODULE_DIR$/Sources/justMUSIC/ios/.symlinks/plugins/geolocator_apple/example/.pub" />
<excludeFolder url="file://$MODULE_DIR$/Sources/justMUSIC/ios/.symlinks/plugins/geolocator_apple/example/build" />
<excludeFolder url="file://$MODULE_DIR$/Sources/justMUSIC/ios/.symlinks/plugins/geolocator_apple/example/.dart_tool" />
<excludeFolder url="file://$MODULE_DIR$/Sources/justMUSIC/ios/.symlinks/plugins/path_provider_foundation/example/build" />
<excludeFolder url="file://$MODULE_DIR$/Sources/justMUSIC/ios/.symlinks/plugins/path_provider_foundation/example/.pub" />
<excludeFolder url="file://$MODULE_DIR$/Sources/justMUSIC/ios/.symlinks/plugins/path_provider_foundation/example/.dart_tool" />
</content>
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />

@ -180,7 +180,7 @@
<entry key="collection">
<value>
<list>
<option value="$USER_HOME$/.pub-cache/hosted/pub.dev/collection-1.17.2/lib" />
<option value="$USER_HOME$/.pub-cache/hosted/pub.dev/collection-1.18.0/lib" />
</list>
</value>
</entry>
@ -362,7 +362,7 @@
<entry key="flutter">
<value>
<list>
<option value="$USER_HOME$/flutter/packages/flutter/lib" />
<option value="$PROJECT_DIR$/../../flutter/packages/flutter/lib" />
</list>
</value>
</entry>
@ -474,14 +474,14 @@
<entry key="flutter_test">
<value>
<list>
<option value="$USER_HOME$/flutter/packages/flutter_test/lib" />
<option value="$PROJECT_DIR$/../../flutter/packages/flutter_test/lib" />
</list>
</value>
</entry>
<entry key="flutter_web_plugins">
<value>
<list>
<option value="$USER_HOME$/flutter/packages/flutter_web_plugins/lib" />
<option value="$PROJECT_DIR$/../../flutter/packages/flutter_web_plugins/lib" />
</list>
</value>
</entry>
@ -726,7 +726,7 @@
<entry key="meta">
<value>
<list>
<option value="$USER_HOME$/.pub-cache/hosted/pub.dev/meta-1.9.1/lib" />
<option value="$USER_HOME$/.pub-cache/hosted/pub.dev/meta-1.10.0/lib" />
</list>
</value>
</entry>
@ -859,7 +859,7 @@
<entry key="sky_engine">
<value>
<list>
<option value="$USER_HOME$/flutter/bin/cache/pkg/sky_engine/lib" />
<option value="$PROJECT_DIR$/../../flutter/bin/cache/pkg/sky_engine/lib" />
</list>
</value>
</entry>
@ -901,14 +901,14 @@
<entry key="stack_trace">
<value>
<list>
<option value="$USER_HOME$/.pub-cache/hosted/pub.dev/stack_trace-1.11.0/lib" />
<option value="$USER_HOME$/.pub-cache/hosted/pub.dev/stack_trace-1.11.1/lib" />
</list>
</value>
</entry>
<entry key="stream_channel">
<value>
<list>
<option value="$USER_HOME$/.pub-cache/hosted/pub.dev/stream_channel-2.1.1/lib" />
<option value="$USER_HOME$/.pub-cache/hosted/pub.dev/stream_channel-2.1.2/lib" />
</list>
</value>
</entry>
@ -936,7 +936,7 @@
<entry key="test_api">
<value>
<list>
<option value="$USER_HOME$/.pub-cache/hosted/pub.dev/test_api-0.6.0/lib" />
<option value="$USER_HOME$/.pub-cache/hosted/pub.dev/test_api-0.6.1/lib" />
</list>
</value>
</entry>
@ -1013,7 +1013,7 @@
<entry key="web">
<value>
<list>
<option value="$USER_HOME$/.pub-cache/hosted/pub.dev/web-0.1.4-beta/lib" />
<option value="$USER_HOME$/.pub-cache/hosted/pub.dev/web-0.3.0/lib" />
</list>
</value>
</entry>
@ -1073,7 +1073,7 @@
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/cloud_firestore-4.8.4/lib" />
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/cloud_firestore_platform_interface-5.15.3/lib" />
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/cloud_firestore_web-3.6.3/lib" />
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/collection-1.17.2/lib" />
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/collection-1.18.0/lib" />
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/convert-3.1.1/lib" />
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/cross_file-0.3.3+4/lib" />
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/crypto-3.0.3/lib" />
@ -1148,7 +1148,7 @@
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/lottie-2.5.0/lib" />
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/matcher-0.12.16/lib" />
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/material_color_utilities-0.5.0/lib" />
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/meta-1.9.1/lib" />
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/meta-1.10.0/lib" />
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/mime-1.0.4/lib" />
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/modal_bottom_sheet-2.1.2/lib" />
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/octo_image-1.0.2/lib" />
@ -1172,12 +1172,12 @@
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/source_span-1.10.0/lib" />
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/sqflite-2.3.0/lib" />
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/sqflite_common-2.5.0/lib" />
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/stack_trace-1.11.0/lib" />
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/stream_channel-2.1.1/lib" />
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/stack_trace-1.11.1/lib" />
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/stream_channel-2.1.2/lib" />
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/string_scanner-1.2.0/lib" />
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/synchronized-3.1.0/lib" />
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/term_glyph-1.2.1/lib" />
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/test_api-0.6.0/lib" />
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/test_api-0.6.1/lib" />
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/text_scroll-0.2.0/lib" />
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/timezone-0.9.2/lib" />
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/top_snackbar_flutter-3.1.0/lib" />
@ -1188,15 +1188,15 @@
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/vector_graphics_codec-1.1.7/lib" />
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/vector_graphics_compiler-1.1.7/lib" />
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/vector_math-2.1.4/lib" />
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/web-0.1.4-beta/lib" />
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/web-0.3.0/lib" />
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/win32-5.0.6/lib" />
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/xdg_directories-1.0.1/lib" />
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/xml-6.3.0/lib" />
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/zoom_tap_animation-1.1.0/lib" />
<root url="file://$USER_HOME$/flutter/bin/cache/pkg/sky_engine/lib" />
<root url="file://$USER_HOME$/flutter/packages/flutter/lib" />
<root url="file://$USER_HOME$/flutter/packages/flutter_test/lib" />
<root url="file://$USER_HOME$/flutter/packages/flutter_web_plugins/lib" />
<root url="file://$PROJECT_DIR$/../../flutter/bin/cache/pkg/sky_engine/lib" />
<root url="file://$PROJECT_DIR$/../../flutter/packages/flutter/lib" />
<root url="file://$PROJECT_DIR$/../../flutter/packages/flutter_test/lib" />
<root url="file://$PROJECT_DIR$/../../flutter/packages/flutter_web_plugins/lib" />
</CLASSES>
<JAVADOC />
<SOURCES />

@ -1,26 +1,27 @@
<component name="libraryTable">
<library name="Dart SDK">
<CLASSES>
<root url="file://$PROJECT_DIR$/../../../../src/flutter/bin/cache/dart-sdk/lib/async" />
<root url="file://$PROJECT_DIR$/../../../../src/flutter/bin/cache/dart-sdk/lib/cli" />
<root url="file://$PROJECT_DIR$/../../../../src/flutter/bin/cache/dart-sdk/lib/collection" />
<root url="file://$PROJECT_DIR$/../../../../src/flutter/bin/cache/dart-sdk/lib/convert" />
<root url="file://$PROJECT_DIR$/../../../../src/flutter/bin/cache/dart-sdk/lib/core" />
<root url="file://$PROJECT_DIR$/../../../../src/flutter/bin/cache/dart-sdk/lib/developer" />
<root url="file://$PROJECT_DIR$/../../../../src/flutter/bin/cache/dart-sdk/lib/ffi" />
<root url="file://$PROJECT_DIR$/../../../../src/flutter/bin/cache/dart-sdk/lib/html" />
<root url="file://$PROJECT_DIR$/../../../../src/flutter/bin/cache/dart-sdk/lib/indexed_db" />
<root url="file://$PROJECT_DIR$/../../../../src/flutter/bin/cache/dart-sdk/lib/io" />
<root url="file://$PROJECT_DIR$/../../../../src/flutter/bin/cache/dart-sdk/lib/isolate" />
<root url="file://$PROJECT_DIR$/../../../../src/flutter/bin/cache/dart-sdk/lib/js" />
<root url="file://$PROJECT_DIR$/../../../../src/flutter/bin/cache/dart-sdk/lib/js_interop" />
<root url="file://$PROJECT_DIR$/../../../../src/flutter/bin/cache/dart-sdk/lib/js_util" />
<root url="file://$PROJECT_DIR$/../../../../src/flutter/bin/cache/dart-sdk/lib/math" />
<root url="file://$PROJECT_DIR$/../../../../src/flutter/bin/cache/dart-sdk/lib/mirrors" />
<root url="file://$PROJECT_DIR$/../../../../src/flutter/bin/cache/dart-sdk/lib/svg" />
<root url="file://$PROJECT_DIR$/../../../../src/flutter/bin/cache/dart-sdk/lib/typed_data" />
<root url="file://$PROJECT_DIR$/../../../../src/flutter/bin/cache/dart-sdk/lib/web_audio" />
<root url="file://$PROJECT_DIR$/../../../../src/flutter/bin/cache/dart-sdk/lib/web_gl" />
<root url="file:///opt/homebrew/opt/dart/libexec/lib/async" />
<root url="file:///opt/homebrew/opt/dart/libexec/lib/cli" />
<root url="file:///opt/homebrew/opt/dart/libexec/lib/collection" />
<root url="file:///opt/homebrew/opt/dart/libexec/lib/convert" />
<root url="file:///opt/homebrew/opt/dart/libexec/lib/core" />
<root url="file:///opt/homebrew/opt/dart/libexec/lib/developer" />
<root url="file:///opt/homebrew/opt/dart/libexec/lib/ffi" />
<root url="file:///opt/homebrew/opt/dart/libexec/lib/html" />
<root url="file:///opt/homebrew/opt/dart/libexec/lib/indexed_db" />
<root url="file:///opt/homebrew/opt/dart/libexec/lib/io" />
<root url="file:///opt/homebrew/opt/dart/libexec/lib/isolate" />
<root url="file:///opt/homebrew/opt/dart/libexec/lib/js" />
<root url="file:///opt/homebrew/opt/dart/libexec/lib/js_interop" />
<root url="file:///opt/homebrew/opt/dart/libexec/lib/js_interop_unsafe" />
<root url="file:///opt/homebrew/opt/dart/libexec/lib/js_util" />
<root url="file:///opt/homebrew/opt/dart/libexec/lib/math" />
<root url="file:///opt/homebrew/opt/dart/libexec/lib/mirrors" />
<root url="file:///opt/homebrew/opt/dart/libexec/lib/svg" />
<root url="file:///opt/homebrew/opt/dart/libexec/lib/typed_data" />
<root url="file:///opt/homebrew/opt/dart/libexec/lib/web_audio" />
<root url="file:///opt/homebrew/opt/dart/libexec/lib/web_gl" />
</CLASSES>
<JAVADOC />
<SOURCES />

Binary file not shown.

After

Width:  |  Height:  |  Size: 162 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 844 KiB

@ -33,6 +33,8 @@ JustMusic est un projet collaboratif à but lucratif pour Android/IOS utilisant
C'est un réseau social donc l'utilisateur pourra publier et commenter des posts. Il pourra s'abonner à d'autre utilisateurs pour voir leurs post sur son fil d'actualité.
**Lien pour tester la version web:** [Just Music](https://justmusic-435d5.web.app) 🎶
## Répartition du Gitlab
La racine de notre gitlab est composé de deux dossier essentielles au projet:
@ -47,10 +49,33 @@ La racine de notre gitlab est composé de deux dossier essentielles au projet:
## Fonctionnement
<div align = center>
<img src="Documentation/Images/Overview.png" />
</div>
### Feeds
Une fois authentifié vous aurez la possibilité de voir les posts capsules de vos amis, de voir les musiques qu'ils mettent en avant accompagner éventuellement d'une image, d'une description, de leurs localisations... (Vous n'avez pas d'amis, pas de soucis, cliquer seulement sur l'icon en haut a gauche de la page pour suivre nimporte quel personne que vous voulez), Mais aussi juste d'un simple mouvement du doigt swiper pour vous retrouvez sur la page Discovery où vous verrais les posts récents en tendance dans le monde 🌎
Amuser vous à cliquer sur les posts pour ecouter la music mais aussi connaître les détails et savoir qui a commenter 💬 et liker ❤️. Si la musique vous plaît enregistrer la et vous la retrouverez lorsque vous aurez envie de poster.
### Post
Pour participer à cette aventure musicale avec des gens du monde entier, cliquez simplement sur l'icône JustMusic. Gardez à l'esprit que vous ne pourrez poster qu'une fois par jour, donc réfléchissez bien à la musique que vous souhaitez mettre en avant. N'hésitez pas à ajouter une photo et une description pour rendre votre publication plus chaleureuse 😃.
### Profil
Consultez l'aperçu de votre profil pour savoir combien de personnes vous suivent et que vous suivez. Vous pouvez également voir le nombre de capsules que vous avez publiées, personnaliser les paramètres de votre compte selon vos préférences, et explorez votre historique de capsules pour vous remémorer vos précédentes publications 🎧.
#### Bonne aventure musicale 🎵🌟
## Deploiement
- [x] &nbsp; ![IOS](https://img.shields.io/badge/IOS-000?style=for-the-badge&logo=apple&logoColor=black&color=white)
- [x] &nbsp; ![Android](https://img.shields.io/badge/Android-000?style=for-the-badge&logo=android&logoColor=white&color=green)
- [x] &nbsp; ![Safari](https://img.shields.io/badge/Safari-000000.svg?style=for-the-badge&logo=Safari&logoColor=white)
## Techniciens

BIN
Sources/.DS_Store vendored

Binary file not shown.

@ -0,0 +1,5 @@
{
"projects": {
"default": "justmusic-435d5"
}
}

@ -4,7 +4,7 @@
# This file should be version controlled and should not be manually edited.
version:
revision: "2524052335ec76bb03e04ede244b071f1b86d190"
revision: "db7ef5bf9f59442b0e200a90587e8fa5e0c6336a"
channel: "stable"
project_type: app
@ -13,11 +13,26 @@ project_type: app
migration:
platforms:
- platform: root
create_revision: 2524052335ec76bb03e04ede244b071f1b86d190
base_revision: 2524052335ec76bb03e04ede244b071f1b86d190
create_revision: db7ef5bf9f59442b0e200a90587e8fa5e0c6336a
base_revision: db7ef5bf9f59442b0e200a90587e8fa5e0c6336a
- platform: android
create_revision: db7ef5bf9f59442b0e200a90587e8fa5e0c6336a
base_revision: db7ef5bf9f59442b0e200a90587e8fa5e0c6336a
- platform: ios
create_revision: 2524052335ec76bb03e04ede244b071f1b86d190
base_revision: 2524052335ec76bb03e04ede244b071f1b86d190
create_revision: db7ef5bf9f59442b0e200a90587e8fa5e0c6336a
base_revision: db7ef5bf9f59442b0e200a90587e8fa5e0c6336a
- platform: linux
create_revision: db7ef5bf9f59442b0e200a90587e8fa5e0c6336a
base_revision: db7ef5bf9f59442b0e200a90587e8fa5e0c6336a
- platform: macos
create_revision: db7ef5bf9f59442b0e200a90587e8fa5e0c6336a
base_revision: db7ef5bf9f59442b0e200a90587e8fa5e0c6336a
- platform: web
create_revision: db7ef5bf9f59442b0e200a90587e8fa5e0c6336a
base_revision: db7ef5bf9f59442b0e200a90587e8fa5e0c6336a
- platform: windows
create_revision: db7ef5bf9f59442b0e200a90587e8fa5e0c6336a
base_revision: db7ef5bf9f59442b0e200a90587e8fa5e0c6336a
# User provided section

Binary file not shown.

After

Width:  |  Height:  |  Size: 22 KiB

@ -0,0 +1,17 @@
{
"hosting": {
"site": "justmusic-435d5",
"public": "build/web",
"ignore": [
"firebase.json",
"**/.*",
"**/node_modules/**"
],
"rewrites": [
{
"source": "**",
"destination": "/index.html"
}
]
}
}

@ -1,5 +1,5 @@
# Uncomment this line to define a global platform for your project
# platform :ios, '11.0'
platform :ios, '11.0'
# CocoaPods analytics sends network stats synchronously affecting flutter build latency.
ENV['COCOAPODS_DISABLE_STATS'] = 'true'

@ -953,6 +953,6 @@ SPEC CHECKSUMS:
PromisesObjC: c50d2056b5253dadbd6c2bea79b0674bd5a52fa4
sqflite: 31f7eba61e3074736dff8807a9b41581e4f7f15a
PODFILE CHECKSUM: 70d9d25280d0dd177a5f637cdb0f0b0b12c6a189
PODFILE CHECKSUM: 6b9eb94e9f98a329f2ef624b852a6e42d090af2b
COCOAPODS: 1.12.1
COCOAPODS: 1.14.3

@ -15,6 +15,7 @@
97C146FC1CF9000F007C117D /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FA1CF9000F007C117D /* Main.storyboard */; };
97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FD1CF9000F007C117D /* Assets.xcassets */; };
97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */; };
C95EC3D52B114F7D00A316A2 /* GoogleService-Info.plist in Resources */ = {isa = PBXBuildFile; fileRef = C95EC3D42B114F7D00A316A2 /* GoogleService-Info.plist */; };
DE887488687930BD9A821E09 /* Pods_Runner.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 895D1BE06AED43E6E7367693 /* Pods_Runner.framework */; };
/* End PBXBuildFile section */
@ -64,6 +65,7 @@
97C147001CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = "<group>"; };
97C147021CF9000F007C117D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
C7930A860EC8743E6A941D8D /* Pods_RunnerTests.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_RunnerTests.framework; sourceTree = BUILT_PRODUCTS_DIR; };
C95EC3D42B114F7D00A316A2 /* GoogleService-Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = "GoogleService-Info.plist"; sourceTree = "<group>"; };
F782B307897A4B77B59D0897 /* Pods-Runner.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.release.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig"; sourceTree = "<group>"; };
/* End PBXFileReference section */
@ -130,6 +132,7 @@
97C146F01CF9000F007C117D /* Runner */ = {
isa = PBXGroup;
children = (
C95EC3D42B114F7D00A316A2 /* GoogleService-Info.plist */,
97C146FA1CF9000F007C117D /* Main.storyboard */,
97C146FD1CF9000F007C117D /* Assets.xcassets */,
97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */,
@ -263,6 +266,7 @@
3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */,
97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */,
97C146FC1CF9000F007C117D /* Main.storyboard in Resources */,
C95EC3D52B114F7D00A316A2 /* GoogleService-Info.plist in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@ -434,6 +438,7 @@
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
CLANG_WARN_STRICT_PROTOTYPES = YES;
CLANG_WARN_SUSPICIOUS_MOVE = YES;
@ -444,6 +449,7 @@
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
ENABLE_NS_ASSERTIONS = NO;
ENABLE_STRICT_OBJC_MSGSEND = YES;
ENABLE_USER_SCRIPT_SANDBOXING = YES;
GCC_C_LANGUAGE_STANDARD = gnu99;
GCC_NO_COMMON_BLOCKS = YES;
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
@ -452,7 +458,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 11.0;
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
MTL_ENABLE_DEBUG_INFO = NO;
SDKROOT = iphoneos;
SUPPORTED_PLATFORMS = iphoneos;
@ -467,16 +473,21 @@
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CLANG_ENABLE_MODULES = YES;
CODE_SIGN_IDENTITY = "Apple Development";
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
DEVELOPMENT_TEAM = 35KQ5BDC64;
ENABLE_BITCODE = NO;
ENABLE_USER_SCRIPT_SANDBOXING = NO;
INFOPLIST_FILE = Runner/Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 17.0;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
);
PRODUCT_BUNDLE_IDENTIFIER = com.justdev.justmusic;
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = "";
SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
SWIFT_VERSION = 5.0;
VERSIONING_SYSTEM = "apple-generic";
@ -556,6 +567,7 @@
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
CLANG_WARN_STRICT_PROTOTYPES = YES;
CLANG_WARN_SUSPICIOUS_MOVE = YES;
@ -566,6 +578,7 @@
DEBUG_INFORMATION_FORMAT = dwarf;
ENABLE_STRICT_OBJC_MSGSEND = YES;
ENABLE_TESTABILITY = YES;
ENABLE_USER_SCRIPT_SANDBOXING = YES;
GCC_C_LANGUAGE_STANDARD = gnu99;
GCC_DYNAMIC_NO_PIC = NO;
GCC_NO_COMMON_BLOCKS = YES;
@ -580,7 +593,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 11.0;
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
MTL_ENABLE_DEBUG_INFO = YES;
ONLY_ACTIVE_ARCH = YES;
SDKROOT = iphoneos;
@ -611,6 +624,7 @@
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
CLANG_WARN_STRICT_PROTOTYPES = YES;
CLANG_WARN_SUSPICIOUS_MOVE = YES;
@ -621,6 +635,7 @@
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
ENABLE_NS_ASSERTIONS = NO;
ENABLE_STRICT_OBJC_MSGSEND = YES;
ENABLE_USER_SCRIPT_SANDBOXING = YES;
GCC_C_LANGUAGE_STANDARD = gnu99;
GCC_NO_COMMON_BLOCKS = YES;
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
@ -629,7 +644,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 11.0;
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
MTL_ENABLE_DEBUG_INFO = NO;
SDKROOT = iphoneos;
SUPPORTED_PLATFORMS = iphoneos;
@ -646,16 +661,21 @@
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CLANG_ENABLE_MODULES = YES;
CODE_SIGN_IDENTITY = "Apple Development";
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
DEVELOPMENT_TEAM = 35KQ5BDC64;
ENABLE_BITCODE = NO;
ENABLE_USER_SCRIPT_SANDBOXING = NO;
INFOPLIST_FILE = Runner/Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 17.0;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
);
PRODUCT_BUNDLE_IDENTIFIER = com.justdev.justmusic;
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = "";
SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
SWIFT_VERSION = 5.0;
@ -669,16 +689,21 @@
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CLANG_ENABLE_MODULES = YES;
CODE_SIGN_IDENTITY = "Apple Development";
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
DEVELOPMENT_TEAM = 35KQ5BDC64;
ENABLE_BITCODE = NO;
ENABLE_USER_SCRIPT_SANDBOXING = NO;
INFOPLIST_FILE = Runner/Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 17.0;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
);
PRODUCT_BUNDLE_IDENTIFIER = com.justdev.justmusic;
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = "";
SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
SWIFT_VERSION = 5.0;
VERSIONING_SYSTEM = "apple-generic";

Binary file not shown.

Before

Width:  |  Height:  |  Size: 11 KiB

After

Width:  |  Height:  |  Size: 60 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 295 B

After

Width:  |  Height:  |  Size: 421 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 406 B

After

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 450 B

After

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 282 B

After

Width:  |  Height:  |  Size: 729 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 462 B

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 704 B

After

Width:  |  Height:  |  Size: 3.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 406 B

After

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 586 B

After

Width:  |  Height:  |  Size: 2.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 862 B

After

Width:  |  Height:  |  Size: 5.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 862 B

After

Width:  |  Height:  |  Size: 5.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.6 KiB

After

Width:  |  Height:  |  Size: 9.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 762 B

After

Width:  |  Height:  |  Size: 2.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.2 KiB

After

Width:  |  Height:  |  Size: 7.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.4 KiB

After

Width:  |  Height:  |  Size: 8.6 KiB

@ -0,0 +1,36 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CLIENT_ID</key>
<string>994903990520-n6jd98ena56kb1tvtrd67tvb5et3nfbf.apps.googleusercontent.com</string>
<key>REVERSED_CLIENT_ID</key>
<string>com.googleusercontent.apps.994903990520-n6jd98ena56kb1tvtrd67tvb5et3nfbf</string>
<key>ANDROID_CLIENT_ID</key>
<string>994903990520-073l30b0afj0uq7apsvc8p8ukantpu6q.apps.googleusercontent.com</string>
<key>API_KEY</key>
<string>AIzaSyBbYqsR6t7JTi8_XFNEHd43IRuKlYGeI3U</string>
<key>GCM_SENDER_ID</key>
<string>994903990520</string>
<key>PLIST_VERSION</key>
<string>1</string>
<key>BUNDLE_ID</key>
<string>com.example.justmusic</string>
<key>PROJECT_ID</key>
<string>justmusic-435d5</string>
<key>STORAGE_BUCKET</key>
<string>justmusic-435d5.appspot.com</string>
<key>IS_ADS_ENABLED</key>
<false></false>
<key>IS_ANALYTICS_ENABLED</key>
<false></false>
<key>IS_APPINVITE_ENABLED</key>
<true></true>
<key>IS_GCM_ENABLED</key>
<true></true>
<key>IS_SIGNIN_ENABLED</key>
<true></true>
<key>GOOGLE_APP_ID</key>
<string>1:994903990520:ios:93188f32e320babe0a9b0d</string>
</dict>
</plist>

@ -2,6 +2,8 @@
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CADisableMinimumFrameDurationOnPhone</key>
<true/>
<key>CFBundleDevelopmentRegion</key>
<string>$(DEVELOPMENT_LANGUAGE)</string>
<key>CFBundleDisplayName</key>
@ -20,10 +22,31 @@
<string>$(FLUTTER_BUILD_NAME)</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleURLTypes</key>
<array>
<dict>
<key>CFBundleTypeRole</key>
<string>Editor</string>
<key>CFBundleURLSchemes</key>
<array>
<string>com.googleusercontent.apps.994903990520-n6jd98ena56kb1tvtrd67tvb5et3nfbf</string>
</array>
</dict>
</array>
<key>CFBundleVersion</key>
<string>$(FLUTTER_BUILD_NUMBER)</string>
<key>LSRequiresIPhoneOS</key>
<true/>
<key>NSCameraUsageDescription</key>
<string>To capture profile photo please grant camera access</string>
<key>NSLocationAlwaysUsageDescription</key>
<string>Votre message d'autorisation pour une utilisation continue de la localisation</string>
<key>NSLocationWhenInUseUsageDescription</key>
<string>Votre message d'autorisation lorsque l'application est en cours d'utilisation</string>
<key>NSPhotoLibraryUsageDescription</key>
<string>App needs access to photo lib for profile images</string>
<key>UIApplicationSupportsIndirectInputEvents</key>
<true/>
<key>UILaunchStoryboardName</key>
<string>LaunchScreen</string>
<key>UIMainStoryboardFile</key>
@ -41,15 +64,5 @@
<string>UIInterfaceOrientationLandscapeLeft</string>
<string>UIInterfaceOrientationLandscapeRight</string>
</array>
<key>CADisableMinimumFrameDurationOnPhone</key>
<true/>
<key>UIApplicationSupportsIndirectInputEvents</key>
<true/>
<key>NSPhotoLibraryUsageDescription</key>
<string>App needs access to photo lib for profile images</string>
<key>NSCameraUsageDescription</key>
<string>To capture profile photo please grant camera access</string>
</dict>
</plist>

@ -1,4 +1,4 @@
import 'package:flutter/Material.dart';
import 'package:flutter/material.dart';
import '../values/constants.dart';

@ -1,4 +1,4 @@
import 'package:flutter/Material.dart';
import 'package:flutter/material.dart';
import 'package:google_fonts/google_fonts.dart';
import 'package:ionicons/ionicons.dart';
import 'package:tuple/tuple.dart';

@ -1,4 +1,4 @@
import 'package:flutter/Material.dart';
import 'package:flutter/material.dart';
import '../main.dart';
import '../model/Music.dart';

@ -1,4 +1,4 @@
import 'package:flutter/Material.dart';
import 'package:flutter/material.dart';
import 'package:google_fonts/google_fonts.dart';
import 'package:justmusic/values/constants.dart';
import 'package:tuple/tuple.dart';

@ -10,11 +10,21 @@ class CommentComponent extends StatelessWidget {
final Comment comment;
const CommentComponent({Key? key, required this.comment}) : super(key: key);
String calculateTimeDifference(DateTime startDate) {
Duration difference = DateTime.now().difference(startDate);
if (difference.inDays > 0) {
return '${difference.inDays} jours';
} else if (difference.inHours > 0) {
return '${difference.inHours} heures';
} else if (difference.inMinutes > 0) {
return '${difference.inMinutes} minutes';
} else {
return '${difference.inSeconds} secondes';
}
}
@override
Widget build(BuildContext context) {
final now = DateTime.now();
final difference = now.difference(comment.date);
return Container(
width: double.infinity,
@ -56,7 +66,7 @@ class CommentComponent extends StatelessWidget {
Padding(
padding: EdgeInsets.only(top: 6, left: 10),
child: Text(
"il y a ${difference.inHours > 0 ? difference.inHours : difference.inMinutes}${difference.inHours > 0 ? "h" : "m"}",
"il y a ${calculateTimeDifference(comment.date)}",
style: GoogleFonts.plusJakartaSans(
color: Colors.white.withOpacity(0.6), fontWeight: FontWeight.w400, fontSize: 10),
),

@ -1,7 +1,9 @@
import 'dart:io';
import 'package:animated_appear/animated_appear.dart';
import 'package:auto_size_text/auto_size_text.dart';
import 'package:flutter/Material.dart';
import 'package:firebase_storage/firebase_storage.dart';
import 'package:flutter/foundation.dart';
import 'package:flutter/material.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/services.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
@ -60,17 +62,19 @@ class _EditablePostComponentState extends State<EditablePostComponent> with Tick
}
Future pickImage(ImageSource source) async {
try {
final image = await ImagePicker().pickImage(source: source, imageQuality: 20);
if (image == null) return;
final imageTemp = File(image.path);
setState(() {
this.image = imageTemp;
widget.callBackImage(imageTemp);
});
} on PlatformException catch (e) {
print('Failed to pick image: $e');
}
try {
final image = await ImagePicker().pickImage(source: source, imageQuality: 20);
if (image == null) return;
final imageTemp = File(image.path);
setState(() {
this.image = imageTemp;
widget.callBackImage(imageTemp);
});
} on PlatformException catch (e) {
print('Failed to pick image: $e');
}
}
void _updateDescription(String text) {
@ -181,7 +185,10 @@ class _EditablePostComponentState extends State<EditablePostComponent> with Tick
borderRadius: BorderRadius.circular(20),
child: InstaImageViewer(
backgroundIsTransparent: true,
child: Image(
child: kIsWeb?InstaImageViewer(
backgroundIsTransparent: true,
child: Image.network(image!.path)
):Image(
image: FileImage(image!),
fit: BoxFit.cover,
),
@ -249,8 +256,8 @@ class _EditablePostComponentState extends State<EditablePostComponent> with Tick
width: double.infinity,
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Expanded(
children: [ kIsWeb?Container()
:Expanded(
flex: 5,
child: GestureDetector(
onTap: () {
@ -261,7 +268,7 @@ class _EditablePostComponentState extends State<EditablePostComponent> with Tick
),
),
),
SizedBox(
kIsWeb?Container():SizedBox(
width: 15,
),
Expanded(
@ -284,6 +291,7 @@ class _EditablePostComponentState extends State<EditablePostComponent> with Tick
child: SizedBox(
width: double.infinity,
child: TextFormField(
keyboardType: TextInputType.text,
onChanged: (value) {
_updateDescription(value);
},

@ -1,4 +1,4 @@
import 'package:flutter/Material.dart';
import 'package:flutter/material.dart';
import 'package:flutter/cupertino.dart';
import 'package:google_fonts/google_fonts.dart';
import 'package:justmusic/main.dart';
@ -34,59 +34,68 @@ class _HistoricComponentState extends State<HistoricComponent> {
.getHistoryCapsulesMonthWhitIdUser(MyApp.userViewModel.userCurrent.id, widget.month, widget.year),
builder: (context, snapshot) {
if (snapshot.hasData) {
return Wrap(
spacing: 14,
runSpacing: 14,
children: List.generate(getNumberOfDaysInMonth(widget.year, widget.month), (index) {
Tuple2<int, Music>? checkCapsule;
if (snapshot.data != null) {
for (var element in snapshot.data!) {
if (element.item1 == index + 1) {
checkCapsule = element;
return Container(
constraints: const BoxConstraints( maxWidth: 600),
child: Wrap(
spacing: 14,
runSpacing: 14,
children: List.generate(getNumberOfDaysInMonth(widget.year, widget.month), (index) {
Tuple2<int, Music>? checkCapsule;
if (snapshot.data != null) {
for (var element in snapshot.data!) {
if (element.item1 == index + 1) {
checkCapsule = element;
}
}
}
}
if ((widget.year > DateTime.now().year || widget.month > DateTime.now().month) ||
(widget.year == DateTime.now().year &&
widget.month == DateTime.now().month &&
index > DateTime.now().day)) {
return Container(
decoration: BoxDecoration(
gradient: LinearGradient(colors: [
Color(0xFF1E1E1E).withOpacity(0.7),
Color(0xFF1E1E1E).withOpacity(0),
], begin: Alignment.topCenter, end: Alignment.bottomCenter),
borderRadius: BorderRadius.circular(5)),
height: 60,
width: 60,
);
}
if (checkCapsule != null) {
return Container(
decoration: BoxDecoration(
image: DecorationImage(image: NetworkImage((checkCapsule.item2.cover)!)),
borderRadius: BorderRadius.circular(5)),
height: 60,
width: 60,
);
} else {
return Container(
color: bgColor,
height: 60,
width: 60,
child: Center(
child: Text(
(index + 1).toString(),
style:
GoogleFonts.plusJakartaSans(color: Colors.white, fontSize: 22, fontWeight: FontWeight.w800),
if ((widget.year > DateTime.now().year || widget.month > DateTime.now().month) ||
(widget.year == DateTime.now().year &&
widget.month == DateTime.now().month &&
index > DateTime.now().day)) {
return Container(
decoration: BoxDecoration(
gradient: LinearGradient(colors: [
Color(0xFF1E1E1E).withOpacity(0.7),
Color(0xFF1E1E1E).withOpacity(0),
], begin: Alignment.topCenter, end: Alignment.bottomCenter),
borderRadius: BorderRadius.circular(5)),
height: 60,
width: 60,
);
}
if (checkCapsule != null) {
return Tooltip(
message: "${checkCapsule.item2.artists.first.name} - ${checkCapsule.item2.title}".length < 30? "${checkCapsule.item2.artists.first.name} - ${checkCapsule.item2.title}": "${checkCapsule.item2.artists.first.name} - ${checkCapsule.item2.title}".substring(0,30)+"...",
decoration: const BoxDecoration(
border: Border.fromBorderSide(BorderSide(color: Color(0xFF3A3A3A), width: 1)),
color: tooltipBackground, borderRadius: BorderRadius.all(Radius.circular(20))
),
child: Container(
decoration: BoxDecoration(
image: DecorationImage(image: NetworkImage((checkCapsule.item2.cover)!)),
borderRadius: BorderRadius.circular(5)),
height: 60,
width: 60,
));
} else {
return Container(
color: bgColor,
height: 60,
width: 60,
child: Center(
child: Text(
(index + 1).toString(),
style:
GoogleFonts.plusJakartaSans(color: Colors.white, fontSize: 22, fontWeight: FontWeight.w800),
),
),
),
);
}
);
}
// Generate widgets
}),
// Generate widgets
}),
),
);
} else {
return CupertinoActivityIndicator();

@ -1,4 +1,4 @@
import 'package:flutter/Material.dart';
import 'package:flutter/material.dart';
import 'package:google_fonts/google_fonts.dart';
import '../values/constants.dart';

@ -1,4 +1,4 @@
import 'package:flutter/Material.dart';
import 'package:flutter/material.dart';
import 'package:google_fonts/google_fonts.dart';
import 'package:justmusic/components/play_button_component.dart';
import 'package:text_scroll/text_scroll.dart';

@ -1,4 +1,4 @@
import 'package:flutter/Material.dart';
import 'package:flutter/material.dart';
import 'package:flutter_animated_play_button/flutter_animated_play_button.dart';
import 'package:ionicons/ionicons.dart';

@ -1,6 +1,6 @@
import 'dart:ui';
import 'package:flutter/Material.dart';
import 'package:flutter/material.dart';
import 'package:google_fonts/google_fonts.dart';
class PostButtonComponent extends StatefulWidget {

@ -29,21 +29,29 @@ class _PostComponentState extends State<PostComponent> with TickerProviderStateM
choice = !choice;
});
}
String formatPostDate(DateTime postDate) {
DateTime now = DateTime.now();
DateTime yesterday = DateTime(now.year, now.month, now.day - 1);
final List<String> frenchMonths = [
'Janvier',
'Février',
'Mars',
'Avril',
'Mai',
'Juin',
'Juillet',
'Août',
'Septembre',
'Octobre',
'Novembre',
'Décembre'
];
if (postDate.year == now.year && postDate.month == now.month && postDate.day == now.day) {
// Aujourd'hui
return "Aujourd'hui, ${postDate.hour}:${postDate.minute.toString().padLeft(2, '0')}";
} else if (postDate.year == yesterday.year && postDate.month == yesterday.month && postDate.day == yesterday.day) {
// Hier
return 'hier, ${postDate.hour}:${postDate.minute.toString().padLeft(2, '0')}';
} else {
// Autre date
return '${postDate.day} ${_getMonthAbbreviation(postDate.month)} ${postDate.hour}:${postDate.minute.toString().padLeft(2, '0')}';
}
}
String _getMonthAbbreviation(int month) {
const List<String> monthsAbbreviation = [
'janv.', 'févr.', 'mars', 'avr.', 'mai', 'juin', 'juil.', 'août', 'sept.', 'oct.', 'nov.', 'déc.',
];
return monthsAbbreviation[month - 1];
}
@override
void initState() {
@ -101,18 +109,11 @@ class _PostComponentState extends State<PostComponent> with TickerProviderStateM
),
),
),
DateTime(today.year, today.month, today.day).isAtSameMomentAs(
DateTime(widget.post.date.year, widget.post.date.month, widget.post.date.day))
? Text(
"Aujourd'hui, ${widget.post.date.hour}:$mins",
Text(
formatPostDate(widget.post.date),
style: GoogleFonts.plusJakartaSans(
color: Colors.white.withOpacity(0.4), fontWeight: FontWeight.w300, fontSize: 13),
)
: Text(
'${widget.post.date.day} ${frenchMonths[widget.post.date.month - 1]}, ${widget.post.date.hour}:$mins',
style: GoogleFonts.plusJakartaSans(
color: Colors.white.withOpacity(0.4), fontWeight: FontWeight.w300, fontSize: 13),
),
],
),
SizedBox(height: 10),
@ -151,10 +152,8 @@ class _PostComponentState extends State<PostComponent> with TickerProviderStateM
children: [
SizedBox(
width: double.infinity,
child: FadeInImage.assetNetwork(
image: widget.post.music.cover!,
fadeInDuration: const Duration(milliseconds: 100),
placeholder: "assets/images/loadingPlaceholder.gif",
child: Image.network(
widget.post.music.cover!,
),
),
Image(
@ -195,11 +194,9 @@ class _PostComponentState extends State<PostComponent> with TickerProviderStateM
child: ClipRRect(
borderRadius: BorderRadius.circular(13),
// implement image
child: FadeInImage.assetNetwork(
image: widget.post.selfie!,
child: Image.network(
widget.post.selfie!,
fit: BoxFit.cover,
fadeInDuration: const Duration(milliseconds: 100),
placeholder: "assets/images/loadingPlaceholder.gif",
),
),
),

@ -1,4 +1,4 @@
import 'package:flutter/Material.dart';
import 'package:flutter/material.dart';
import '../config/routes.dart';
import '../model/User.dart';

@ -1,4 +1,4 @@
import 'package:flutter/Material.dart';
import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:google_fonts/google_fonts.dart';
import 'package:justmusic/components/profil_picture_component.dart';

@ -1,5 +1,4 @@
import 'package:firebase_auth/firebase_auth.dart';
import 'package:flutter/Material.dart';
import 'package:flutter/material.dart';
import 'package:google_fonts/google_fonts.dart';
import '../main.dart';
import '../model/User.dart' as justMusic;

@ -1,4 +1,4 @@
import 'package:flutter/Material.dart';
import 'package:flutter/material.dart';
import 'package:google_fonts/google_fonts.dart';
import '../values/constants.dart';

@ -135,10 +135,8 @@ class _TopNavBarComponentState extends State<TopNavBarComponent> with TickerProv
@override
Widget build(BuildContext context) {
choice = widget.choice;
return Padding(
padding: const EdgeInsets.only(top: defaultPadding),
child: Container(
padding: EdgeInsets.symmetric(horizontal: defaultPadding),
return SafeArea(top:true,child: Container(
padding: EdgeInsets.symmetric(horizontal: defaultPadding, vertical: 20),
width: double.infinity,
height: 100,
child: Row(

@ -1,10 +1,11 @@
import 'package:flutter/Material.dart';
import 'package:flutter/material.dart';
import 'package:justmusic/screens/add_friend_screen.dart';
import 'package:justmusic/screens/capsule_historic_screen.dart';
import 'package:justmusic/screens/change_password_screen.dart';
import 'package:justmusic/screens/feed_screen.dart';
import 'package:justmusic/screens/profile_screen.dart';
import 'package:justmusic/screens/user_screen.dart';
import 'package:justmusic/screens/welcome_screen.dart';
import '../model/User.dart';
@ -109,3 +110,15 @@ Route routeHistoric() {
},
);
}
Route routeWelcome() {
return PageRouteBuilder(
pageBuilder: (context, animation, secondaryAnimation) => const WellcomeScreen(),
transitionsBuilder: (context, animation, secondaryAnimation, child) {
return FadeTransition(
opacity: animation,
child: child,
);
},
);
}

@ -5,6 +5,7 @@ import 'package:firebase_auth/firebase_auth.dart';
import 'package:firebase_core/firebase_core.dart';
import 'package:firebase_messaging/firebase_messaging.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/foundation.dart';
import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
@ -19,6 +20,7 @@ import 'package:justmusic/screens/profile_screen.dart';
import 'package:justmusic/screens/registration_screen.dart';
import 'package:justmusic/screens/verify_email_screen.dart';
import 'package:justmusic/screens/welcome_screen.dart';
import 'package:justmusic/values/constants.dart';
import 'package:justmusic/view_model/CommentViewModel.dart';
import 'package:justmusic/view_model/MusicViewModel.dart';
import 'package:justmusic/view_model/PostViewModel.dart';
@ -26,9 +28,8 @@ import 'package:justmusic/view_model/UserViewModel.dart';
import 'package:justmusic/model/User.dart' as userJustMusic;
import 'firebase_options.dart';
import 'package:timezone/data/latest.dart' as tz;
import 'package:flutter/material.dart';
import 'package:intl/intl.dart';
import 'package:intl/date_symbol_data_local.dart';
import 'package:fullscreen_window/fullscreen_window.dart';
Future<void> main() async {
tz.initializeTimeZones();
@ -39,7 +40,9 @@ Future<void> main() async {
options: DefaultFirebaseOptions.currentPlatform,
);
await initializeDateFormatting('fr_FR', null);
await FirebaseMessaging.instance.requestPermission(sound: true);
if (!kIsWeb) {
await FirebaseMessaging.instance.requestPermission(sound: true);
}
runApp(const MyApp());
}
@ -63,6 +66,7 @@ class _MyAppState extends State<MyApp> {
@override
void initState() {
FullScreenWindow.setFullScreen(true); // enter fullscreen
super.initState();
}
@ -76,12 +80,13 @@ class _MyAppState extends State<MyApp> {
@override
Widget build(BuildContext context) {
SystemChrome.setEnabledSystemUIMode(SystemUiMode.immersiveSticky);
Paint.enableDithering = true;
Paint.enableDithering = true; // enter fullscreen
return ScreenUtilInit(
useInheritedMediaQuery: true,
builder: (context, child) {
return MaterialApp(
color: bgColor,
routes: {
'/welcome': (context) => const WellcomeScreen(),
'/feed': (context) => const FeedScreen(),
@ -116,7 +121,7 @@ class _MyAppState extends State<MyApp> {
MyApp.userViewModel.userCurrent = userSnapshot.data!;
return FeedScreen();
} else {
return const Text('User data not found');
return WellcomeScreen();
}
}
},

@ -0,0 +1,34 @@
import 'package:tuple/tuple.dart';
import 'Music.dart';
class Capsule {
final String _id;
late Music _music;
Tuple2<String?,String?> _location;
DateTime _date;
// Constructor
Capsule(this._id, this._location, this._date);
//Getters and setters
String get id => _id;
Music get music => _music;
set music(Music value) {
_music = value;
}
Tuple2<String?, String?> get location => _location;
set location(Tuple2<String?, String?> value) {
_location = value;
}
DateTime get date => _date;
set date(DateTime value) {
_date = value;
}
}

@ -1,4 +1,4 @@
import 'package:flutter/Material.dart';
import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
import 'package:google_fonts/google_fonts.dart';
import 'package:justmusic/values/constants.dart';

@ -1,4 +1,4 @@
import 'package:flutter/Material.dart';
import 'package:flutter/material.dart';
import 'package:google_fonts/google_fonts.dart';
import '../components/historic_component.dart';
@ -77,8 +77,9 @@ class _CapsuleHistoricScreenState extends State<CapsuleHistoricScreen> {
mainAxisAlignment: MainAxisAlignment.center,
crossAxisAlignment: CrossAxisAlignment.center,
children: [
Padding(
padding: const EdgeInsets.only(top: 80, left: 60, right: 60),
Container(
padding: const EdgeInsets.only(top: 80, left: 30, right: 30),
constraints: const BoxConstraints( maxWidth: 700),
child: Align(
alignment: Alignment.center,
child: Row(
@ -130,8 +131,6 @@ class _CapsuleHistoricScreenState extends State<CapsuleHistoricScreen> {
child: SizedBox(
width: double.infinity,
child: Container(
padding: EdgeInsets.symmetric(horizontal: 15),
constraints: BoxConstraints(maxWidth: 600),
child: Column(
children: [
HistoricComponent(

@ -1,6 +1,6 @@
import 'package:firebase_auth/firebase_auth.dart';
import 'package:flutter/Material.dart';
import 'package:flutter/material.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/services.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';

@ -1,5 +1,5 @@
import 'dart:async';
import 'package:flutter/Material.dart';
import 'package:flutter/material.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/services.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
@ -67,15 +67,45 @@ class _DetailPostScreenState extends State<DetailPostScreen> {
}
final ScrollController _scrollController = ScrollController();
String formatPostDate(DateTime postDate) {
DateTime now = DateTime.now();
DateTime yesterday = DateTime(now.year, now.month, now.day - 1);
@override
Widget build(BuildContext context) {
var mins = "0";
if (widget.post.date.minute < 10) {
mins = "0${widget.post.date.minute}";
if (postDate.year == now.year && postDate.month == now.month && postDate.day == now.day) {
// Aujourd'hui
return "Aujourd'hui, ${postDate.hour}:${postDate.minute.toString().padLeft(2, '0')}";
} else if (postDate.year == yesterday.year && postDate.month == yesterday.month && postDate.day == yesterday.day) {
// Hier
return 'hier, ${postDate.hour}:${postDate.minute.toString().padLeft(2, '0')}';
} else {
mins = widget.post.date.minute.toString();
// Autre date
return '${postDate.day} ${_getMonthAbbreviation(postDate.month)} ${postDate.hour}:${postDate.minute.toString().padLeft(2, '0')}';
}
}
String _getMonthAbbreviation(int month) {
const List<String> monthsAbbreviation = [
'janv.', 'févr.', 'mars', 'avr.', 'mai', 'juin', 'juil.', 'août', 'sept.', 'oct.', 'nov.', 'déc.',
];
return monthsAbbreviation[month - 1];
}
// Exemple d'utilisation :
void main() {
DateTime postDate = DateTime(2023, 11, 17, 17, 55); // Remplacez par votre date
String formattedDate = formatPostDate(postDate);
print(formattedDate); // Affichera "17 nov. 17:55" ou "hier, 17:55" selon la date
}
@override
Widget build(BuildContext context) {
_scrollController.addListener(() {
if (_scrollController.position.pixels < 0) _scrollController.jumpTo(0);
});
return GestureDetector(
onTap: () {
FocusScopeNode currentFocus = FocusScope.of(context);
@ -86,6 +116,7 @@ class _DetailPostScreenState extends State<DetailPostScreen> {
},
child: Container(
height: 760.h,
color: bgAppBar,
child: Column(
children: [
Expanded(
@ -118,156 +149,140 @@ class _DetailPostScreenState extends State<DetailPostScreen> {
Column(
children: [
Container(
height: 200,
margin: EdgeInsets.only(top: 230),
width: double.infinity,
decoration: BoxDecoration(
gradient: LinearGradient(
begin: Alignment.topCenter,
end: Alignment.bottomCenter,
colors: [
Colors.transparent,
bgModal.withOpacity(0.5),
bgModal.withOpacity(0.75),
bgModal
],
stops: [0, 0.2, 0.4, 0.8],
height: 200,
margin: EdgeInsets.only(top: 230),
width: double.infinity,
decoration: BoxDecoration(
gradient: LinearGradient(
begin: Alignment.topCenter,
end: Alignment.bottomCenter,
colors: [
Colors.transparent,
bgModal.withOpacity(0.5),
bgModal.withOpacity(0.75),
bgModal
],
stops: [0, 0.2, 0.4, 0.8],
),
),
),
child: Padding(
padding: const EdgeInsets.fromLTRB(20, 0, 20, 10),
child: Row(
crossAxisAlignment: CrossAxisAlignment.end,
children: [
Padding(
padding: const EdgeInsets.only(right: 10),
child: choice
? Padding(
padding: const EdgeInsets.all(4),
child: ClipOval(
child: SizedBox.fromSize(
// Image radius
child: ProfilPictureComponent(user: widget.post.user),
),
),
)
: widget.post.music.previewUrl != null
? ButtonPlayComponent(music: widget.post.music)
: Container(),
),
Flexible(
child: Column(
mainAxisAlignment: MainAxisAlignment.end,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Flexible(
child: Row(
crossAxisAlignment: CrossAxisAlignment.end,
children: [
Expanded(
child: ScrollConfiguration(
behavior: ScrollBehavior().copyWith(scrollbars: false),
child: TextScroll(
choice ? widget.post.user.pseudo : widget.post.music.title!,
style: GoogleFonts.plusJakartaSans(
height: 1,
color: Colors.white,
fontWeight: FontWeight.w800,
fontSize: 22,
child: Padding(
padding: const EdgeInsets.fromLTRB(20, 0, 20, 10),
child: Row(
crossAxisAlignment: CrossAxisAlignment.end,
children: [
Padding(
padding: const EdgeInsets.only(right: 10),
child: choice
? Padding(
padding: const EdgeInsets.all(4),
child: ClipOval(
child: SizedBox.fromSize(
// Image radius
child: ProfilPictureComponent(user: widget.post.user),
),
),
)
: widget.post.music.previewUrl != null
? ButtonPlayComponent(music: widget.post.music)
: Container(),
),
Flexible(
child: Column(
mainAxisAlignment: MainAxisAlignment.end,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Flexible(
child: Row(
crossAxisAlignment: CrossAxisAlignment.end,
children: [
Expanded(
child: ScrollConfiguration(
behavior: ScrollBehavior().copyWith(scrollbars: false),
child: TextScroll(
choice ? widget.post.user.pseudo : widget.post.music.title!,
style: GoogleFonts.plusJakartaSans(
height: 1,
color: Colors.white,
fontWeight: FontWeight.w800,
fontSize: 22,
),
mode: TextScrollMode.endless,
pauseBetween: Duration(milliseconds: 500),
velocity: Velocity(pixelsPerSecond: Offset(20, 0)),
),
mode: TextScrollMode.endless,
pauseBetween: Duration(milliseconds: 500),
velocity: Velocity(pixelsPerSecond: Offset(20, 0)),
),
),
),
Padding(
padding: const EdgeInsets.only(left: 20.0),
child: choice
? DateTime(today.year, today.month, today.day)
.isAtSameMomentAs(
DateTime(
widget.post.date.year,
widget.post.date.month,
widget.post.date.day,
),
)
? Text(
"Aujourd'hui, ${widget.post.date.hour}:$mins",
style: GoogleFonts.plusJakartaSans(
height: 1,
color: Colors.white,
fontWeight: FontWeight.w900,
fontSize: 18,
),
)
: Text(
"hier, ${widget.post.date.hour}:$mins",
style: GoogleFonts.plusJakartaSans(
height: 1,
color: Colors.white,
fontWeight: FontWeight.w900,
fontSize: 18,
),
)
: Text(
widget.post.music.date.toString(),
style: GoogleFonts.plusJakartaSans(
height: 1,
color: Colors.white,
fontWeight: FontWeight.w900,
fontSize: 18,
),
),
),
],
),
),
choice
? widget.post.location.item2 != null
? Text(
"${widget.post.location.item1}, ${widget.post.location.item2}",
Padding(
padding: const EdgeInsets.only(left: 20.0),
child: choice
? Text(
formatPostDate(widget.post.date),
style: GoogleFonts.plusJakartaSans(
color: Colors.white.withOpacity(0.5),
fontWeight: FontWeight.w400,
fontSize: 15,
height: 1,
color: Colors.white,
fontWeight: FontWeight.w900,
fontSize: 18,
),
)
: Text(
"",
: Text(
widget.post.music.date.toString(),
style: GoogleFonts.plusJakartaSans(
color: Colors.white.withOpacity(0.4),
fontWeight: FontWeight.w300,
fontSize: 13,
height: 1,
color: Colors.white,
fontWeight: FontWeight.w900,
fontSize: 18,
),
)
: ScrollConfiguration(
behavior: ScrollBehavior().copyWith(scrollbars: false),
child: TextScroll(
widget.post.music.artists.first.name!,
style: GoogleFonts.plusJakartaSans(
height: 1,
color: Colors.white,
fontWeight: FontWeight.w500,
fontSize: 17,
),
mode: TextScrollMode.endless,
pauseBetween: Duration(milliseconds: 500),
velocity: Velocity(pixelsPerSecond: Offset(20, 0)),
),
],
),
),
choice
? widget.post.location.item2 != null
? Text(
"${widget.post.location.item1}, ${widget.post.location.item2}",
style: GoogleFonts.plusJakartaSans(
color: Colors.white.withOpacity(0.5),
fontWeight: FontWeight.w400,
fontSize: 15,
),
)
: Text(
"",
style: GoogleFonts.plusJakartaSans(
color: Colors.white.withOpacity(0.4),
fontWeight: FontWeight.w300,
fontSize: 13,
),
)
: ScrollConfiguration(
behavior: ScrollBehavior().copyWith(scrollbars: false),
child: TextScroll(
widget.post.music.artists.first.name!,
style: GoogleFonts.plusJakartaSans(
height: 1,
color: Colors.white,
fontWeight: FontWeight.w500,
fontSize: 17,
),
],
mode: TextScrollMode.endless,
pauseBetween: Duration(milliseconds: 500),
velocity: Velocity(pixelsPerSecond: Offset(20, 0)),
),
),
],
),
),
),
],
],
),
),
),
),
widget.post.description != null
? Align(
widget.post.description != null ? Align(
alignment: Alignment.bottomLeft,
child: Padding(
child: Container(
padding: const EdgeInsets.fromLTRB(50, 35, 50, 35),
color: bgModal,
width: double.infinity,
child: Text(
widget.post.description!,
textAlign: TextAlign.left,
@ -281,7 +296,7 @@ class _DetailPostScreenState extends State<DetailPostScreen> {
),
)
: Container(
height: 30,
height: 0,
),
Container(
width: double.infinity,
@ -594,6 +609,7 @@ class _DetailPostScreenState extends State<DetailPostScreen> {
Expanded(
child: TextField(
keyboardAppearance: Brightness.dark,
keyboardType: TextInputType.text,
controller: _textController,
focusNode: myFocusNode,
onSubmitted: (value) async {
@ -608,7 +624,6 @@ class _DetailPostScreenState extends State<DetailPostScreen> {
setState(() {});
},
cursorColor: primaryColor,
keyboardType: TextInputType.emailAddress,
style: GoogleFonts.plusJakartaSans(color: Colors.white),
decoration: InputDecoration(
suffixIcon: _textController.text.isEmpty
@ -627,12 +642,12 @@ class _DetailPostScreenState extends State<DetailPostScreen> {
_textController.clear();
});
},
icon: Icon(
icon: const Icon(
Icons.send,
color: primaryColor,
size: 20,
)),
focusedBorder: OutlineInputBorder(
focusedBorder: const OutlineInputBorder(
borderSide: BorderSide(width: 1, color: grayText),
borderRadius: BorderRadius.all(Radius.circular(100)),
),
@ -640,7 +655,7 @@ class _DetailPostScreenState extends State<DetailPostScreen> {
fillColor: bgModal,
filled: true,
focusColor: Color.fromRGBO(255, 255, 255, 0.30),
enabledBorder: OutlineInputBorder(
enabledBorder: const OutlineInputBorder(
borderSide: BorderSide(width: 1, color: grayText),
borderRadius: BorderRadius.all(Radius.circular(100)),
),

@ -25,13 +25,15 @@ class _FeedScreenState extends State<FeedScreen> with SingleTickerProviderStateM
late Animation<double> animation;
late List<Post> friendFeed;
Timer? timer;
var pageFriend = 0;
late List<Post> discoveryFeed;
late Tuple2<List<Post>, List<Post>> displayFeed;
bool isDismissed = true;
bool choiceFeed = true;
PageController controller = PageController();
@override
void initState() {
super.initState();
@ -124,9 +126,26 @@ class _FeedScreenState extends State<FeedScreen> with SingleTickerProviderStateM
@override
Widget build(BuildContext context) {
displayFeed =
Tuple2(MyApp.postViewModel.postsFriends.reversed.toList(), MyApp.postViewModel.bestPosts.reversed.toList());
Tuple2(MyApp.postViewModel.postsFriends.toList(), MyApp.postViewModel.bestPosts.toList());
bool empty =
(choiceFeed == true && displayFeed.item1.isEmpty) || (choiceFeed == false && displayFeed.item2.isEmpty);
ScrollController _scrollController = ScrollController();
_scrollController.addListener(() {
if (_scrollController.position.maxScrollExtent ==
_scrollController.position.pixels) {
print("fin");
if (choiceFeed) {
setState(() {
MyApp.postViewModel.getMorePostsFriends();
});
} else {
setState(() {
MyApp.postViewModel.getMoreBestPosts();
});
}
}
});
return Scaffold(
resizeToAvoidBottomInset: false,
backgroundColor: bgColor,
@ -185,6 +204,7 @@ class _FeedScreenState extends State<FeedScreen> with SingleTickerProviderStateM
physics: const BouncingScrollPhysics(parent: AlwaysScrollableScrollPhysics()),
clipBehavior: Clip.none,
shrinkWrap: false,
controller: _scrollController,
itemCount: displayFeed.item1.length,
itemBuilder: (BuildContext context, int index) {
return Padding(
@ -193,6 +213,7 @@ class _FeedScreenState extends State<FeedScreen> with SingleTickerProviderStateM
PostComponent(callback: openDetailPost, post: displayFeed.item1[index], index: index),
);
},
),
),
),
@ -212,6 +233,7 @@ class _FeedScreenState extends State<FeedScreen> with SingleTickerProviderStateM
triggerMode: RefreshIndicatorTriggerMode.onEdge,
onRefresh: _refresh,
child: ListView.builder(
controller: _scrollController,
physics: const BouncingScrollPhysics(parent: AlwaysScrollableScrollPhysics()),
clipBehavior: Clip.none,
shrinkWrap: false,

@ -2,7 +2,7 @@ import 'dart:async';
import 'package:auto_size_text/auto_size_text.dart';
import 'package:firebase_auth/firebase_auth.dart';
import 'package:flutter/Material.dart';
import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:google_fonts/google_fonts.dart';
@ -52,9 +52,9 @@ class _ForgetPasswordScreenState extends State<ForgetPasswordScreen> {
setState(() => canResendEmail = true);
} on FirebaseAuthException catch (e) {
if (e.code == "invalid-email") {
error = "Mail incorrect";
} else if (e.code == "user-not-found") {
error = "Format de mail incorrect";
} else if (e.code == "user-not-found") {
error = "Mail incorrect";
} else if (e.code == "too-many-requests") {
error =
"Trop de tentatives. Veuillez réessayer plus tard";

@ -1,4 +1,4 @@
import 'package:flutter/Material.dart';
import 'package:flutter/material.dart';
import 'package:justmusic/config/routes.dart';
import 'package:lottie/lottie.dart';

@ -1,4 +1,4 @@
import 'package:flutter/Material.dart';
import 'package:flutter/material.dart';
import '../values/constants.dart';

@ -1,7 +1,7 @@
import 'dart:io';
import 'dart:ui';
import 'package:animations/animations.dart';
import 'package:flutter/Material.dart';
import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:justmusic/components/back_button.dart';
import 'package:justmusic/screens/launching_rocker_screen.dart';

@ -19,9 +19,9 @@ class ProfileScreen extends StatefulWidget {
class _ProfileScreenState extends State<ProfileScreen> {
@override
Widget build(BuildContext context) {
Future<void> logout() async {
await MyApp.userViewModel.logout();
Navigator.pushNamed(context, '/welcome');
void logout() {
MyApp.userViewModel.logout();
Navigator.of(context).push(routeWelcome());
}
void _openHistoric() {
@ -32,7 +32,40 @@ class _ProfileScreenState extends State<ProfileScreen> {
Navigator.of(context).push(routeUser(MyApp.userViewModel.userCurrent));
}
void _openPassword() {
void openConfirmationDelete() {
showCupertinoModalPopup<void>(
context: context,
barrierColor: Colors.black.withOpacity(0.7),
builder: (BuildContext context) => Container(
child: CupertinoActionSheet(
title: Text(
'Supprimer mon compte',
style: GoogleFonts.plusJakartaSans(fontWeight: FontWeight.bold),
),
actions: <CupertinoActionSheetAction>[
CupertinoActionSheetAction(
onPressed: () {
MyApp.userViewModel.delete();
Navigator.pop(context);
Navigator.of(context).push(routeWelcome());
},
child: Text('Confirmer', style: TextStyle(color: Colors.blue),),
),
],
cancelButton: CupertinoActionSheetAction(
isDestructiveAction: true,
onPressed: () {
Navigator.pop(context);
},
child: const Text('Annuler'),
),
),
),
);
}
void openPassword() {
Navigator.of(context).push(routePassword());
}
@ -117,7 +150,7 @@ class _ProfileScreenState extends State<ProfileScreen> {
SettingPartComponent(
icon: JustMusicIcon.password,
label: 'Modifier mon mot de passe',
action: _openPassword,
action: openPassword,
),
SettingPartComponent(
icon: JustMusicIcon.cross,

@ -1,6 +1,6 @@
import 'dart:ui';
import 'package:flutter/Material.dart';
import 'package:flutter/material.dart';
import 'package:flutter/cupertino.dart';
import '../components/city_list_component.dart';

@ -1,7 +1,7 @@
import 'dart:async';
import 'dart:ui';
import 'package:flutter/Material.dart';
import 'package:flutter/material.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/services.dart';
import 'package:google_fonts/google_fonts.dart';

@ -1,8 +1,5 @@
import 'dart:io';
import 'package:firebase_auth/firebase_auth.dart';
import 'package:firebase_core/firebase_core.dart';
import 'package:flutter/Material.dart';
import 'package:flutter/material.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/services.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
@ -146,10 +143,11 @@ class _UserScreenState extends State<UserScreen> {
padding: const EdgeInsets.symmetric(horizontal: settingPadding),
child: Column(
mainAxisAlignment: MainAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.center,
children: [
Padding(
Container(
padding: EdgeInsets.only(top: 68.h, bottom: 40),
constraints: const BoxConstraints( maxWidth: 500),
child: Stack(
alignment: Alignment.center,
children: [
@ -252,7 +250,11 @@ class _UserScreenState extends State<UserScreen> {
SizedBox(
height: 40,
),
RecapComponent(user: widget.user)
Container(
constraints: const BoxConstraints( maxWidth: 500),
child: RecapComponent(user: widget.user),
)
],
),
),

@ -2,7 +2,7 @@ import 'dart:async';
import 'package:auto_size_text/auto_size_text.dart';
import 'package:firebase_auth/firebase_auth.dart';
import 'package:flutter/Material.dart';
import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:google_fonts/google_fonts.dart';
import 'package:justmusic/main.dart';

@ -0,0 +1,33 @@
import 'package:cloud_firestore/cloud_firestore.dart';
class CapsuleService {
Future<List<bool>> recapSevenDays(String id) async {
List<bool> recapList = [];
DateTime sevenDaysAgo = DateTime.now().subtract(Duration(days: 6));
QuerySnapshot<Map<String, dynamic>> response = await FirebaseFirestore
.instance
.collection("capsules")
.where("user_id", isEqualTo: id)
.get();
List<Map<String, dynamic>?> capsuleList = response.docs
.map((DocumentSnapshot<Map<String, dynamic>> doc) => doc.data())
.toList();
for (int i = 0; i < 7; i++) {
DateTime date = sevenDaysAgo.add(Duration(days: i));
bool capsuleExists = capsuleList.any((post) =>
post?["date"] != null &&
post?["date"].toDate().year == date.year &&
post?["date"].toDate().month == date.month &&
post?["date"].toDate().day == date.day);
recapList.add(capsuleExists);
}
return recapList;
}
}

@ -38,7 +38,7 @@ class GeoApi {
Position position = await Geolocator.getCurrentPosition(
desiredAccuracy: LocationAccuracy.high);
String apiUrl =
'http://api.openweathermap.org/data/2.5/find?lat=${position.latitude}&lon=${position.longitude}&cnt=10&appid=$apiKey';
'https://api.openweathermap.org/data/2.5/find?lat=${position.latitude}&lon=${position.longitude}&cnt=10&appid=$apiKey';
var response = await http.get(Uri.parse(apiUrl));
if (response.statusCode == 200) {
var data = json.decode(response.body);

@ -37,7 +37,7 @@ class MusicService {
List<Tuple2<int, String>> capsules = [];
var querySnapshot = await FirebaseFirestore.instance
.collection('posts')
.collection('capsules')
.where('user_id', isEqualTo: idUser)
.where('date', isGreaterThanOrEqualTo: DateTime(year, month))
.where('date', isLessThan: DateTime(year, month + 1))

@ -23,6 +23,15 @@ class PostService {
var userRef = MyApp.db.collection("users").doc(id);
var capsule = {
"user_id": id,
"date": DateTime.now(),
"place": [location?.item1, location?.item2],
"song_id": idMusic,
};
await MyApp.db.collection("capsules").doc(postAdd.id).set(capsule);
await MyApp.db.runTransaction((transaction) async {
var userSnapshot = await transaction.get(userRef);
if (userSnapshot.exists) {
@ -42,16 +51,41 @@ class PostService {
deletePost() {}
Future<List<QueryDocumentSnapshot<Map<String, dynamic>>>> getPopularPosts(
{int limit = 10,
QueryDocumentSnapshot<Map<String, dynamic>>? offset}) async {
Future<List<QueryDocumentSnapshot<Map<String, dynamic>>>> getPopularPosts(int limit) async {
DateTime twentyFourHoursAgo = DateTime.now().subtract(Duration(hours: 24));
var response = await FirebaseFirestore.instance
.collection("posts")
.where("date", isGreaterThan: twentyFourHoursAgo)
.orderBy("date", descending: true)
.limit(limit)
.get();
MyApp.postViewModel.lastPostDiscovery = response.docs.isNotEmpty
? response.docs.last
: MyApp.postViewModel.lastPostDiscovery;
var filteredPosts = response.docs.where((doc) {
String user = doc["user_id"];
return user != MyApp.userViewModel.userCurrent.id;
}).toList();
return filteredPosts;
}
Future<List<QueryDocumentSnapshot<Map<String, dynamic>>>> getMorePopularPosts(int limit) async {
DateTime twentyFourHoursAgo = DateTime.now().subtract(Duration(hours: 24));
QuerySnapshot<Map<String, dynamic>> response;
response = await FirebaseFirestore.instance
.collection("posts")
.orderBy("date")
.where("date", isGreaterThan: twentyFourHoursAgo)
.orderBy("date", descending: true)
.limit(limit)
.startAfterDocument(MyApp.postViewModel.lastPostDiscovery)
.get();
MyApp.postViewModel.lastPostDiscovery = response.docs.isNotEmpty
? response.docs.last
: MyApp.postViewModel.lastPostDiscovery;
var filteredPosts = response.docs.where((doc) {
String user = doc["user_id"];
return user != MyApp.userViewModel.userCurrent.id;
@ -59,18 +93,41 @@ class PostService {
return filteredPosts;
}
Future<List<QueryDocumentSnapshot<Map<String, dynamic>>>> getPostsFriends(
{int limit = 10, int offset = 0}) async {
Future<List<QueryDocumentSnapshot<Map<String, dynamic>>>> getPostsFriends(int limit) async {
var response = await FirebaseFirestore.instance
.collection("posts")
.where("user_id", whereIn: [
MyApp.userViewModel.userCurrent.id,
...MyApp.userViewModel.userCurrent.followed
])
.where("")
.orderBy("date", descending: true)
.limit(limit)
.get();
MyApp.postViewModel.lastPostFriend = response.docs.isNotEmpty
? response.docs.last
: MyApp.postViewModel.lastPostFriend;
return response.docs;
}
Future<List<QueryDocumentSnapshot<Map<String, dynamic>>>> getMorePostsFriends(int limit) async {
var response = await FirebaseFirestore.instance
.collection("posts")
.where("user_id", whereIn: [
MyApp.userViewModel.userCurrent.id,
...MyApp.userViewModel.userCurrent.followed
])
.orderBy("date")
.orderBy("date", descending: true)
.limit(limit)
.startAfterDocument(MyApp.postViewModel.lastPostFriend)
.get();
MyApp.postViewModel.lastPostFriend = response.docs.isNotEmpty
? response.docs.last
: MyApp.postViewModel.lastPostFriend;
return response.docs;
}
@ -93,35 +150,6 @@ class PostService {
return !isTodayAvailable;
}
Future<List<bool>> recapSevenDays(String id) async {
List<bool> recapList = [];
DateTime sevenDaysAgo = DateTime.now().subtract(Duration(days: 6));
QuerySnapshot<Map<String, dynamic>> response = await FirebaseFirestore
.instance
.collection("posts")
.where("user_id", isEqualTo: id)
.get();
List<Map<String, dynamic>?> postList = response.docs
.map((DocumentSnapshot<Map<String, dynamic>> doc) => doc.data())
.toList();
for (int i = 0; i < 7; i++) {
DateTime date = sevenDaysAgo.add(Duration(days: i));
bool postExists = postList.any((post) =>
post?["date"] != null &&
post?["date"].toDate().year == date.year &&
post?["date"].toDate().month == date.month &&
post?["date"].toDate().day == date.day);
recapList.add(postExists);
}
return recapList;
}
Future<List<String>> getLikesByPostId(String id) async {
var response =
await FirebaseFirestore.instance.collection("posts").doc(id).get();

@ -13,7 +13,7 @@ const bgTextField = Color(0xFF1C1B23);
const strokeTextField = Color(0xFF373546);
const unactiveFeed = Color(0xFF848484);
const gradiantPost = Color(0xFF0D0D0D);
const bgModal = Color(0xFF1E1E1E);
const bgModal = Color(0xFF222222);
const textFieldMessage = Color(0xFF232323);
const bgComment = Color(0xFF222222);
const bgAppBar = Color(0xFF181818);
@ -24,6 +24,7 @@ const searchBarColor = Color(0xFF161616);
const postbutton = Color(0xFF1B1B1B);
const fillButton = Color(0xFF633AF4);
const selectedButton = Color(0xFF1F1B2E);
const tooltipBackground = Color(0xFF2D2D2D);
// All constants important too us
const defaultPadding = 30.0;

@ -0,0 +1,5 @@
const geoKey = "85a2724ad38b3994c2b7ebe1d239bbff";
const clientId = "d9b82921bbdf43efa15d0c34c28c6f93";
const clientSecret = "ba01687f59ea4ab7ad00c769e89e44d8";
const keyApiFirebase =
"AAAA56TmIPg:APA91bFeKMr_i6CbUuuUdFI1XkdaNE2A7OVHzxrPIsOSlDfhR6qzZwof7JNGxthWUKj1dRHQMheWNYaLbf3AtXUp9o4DX_gB2073yR4urqUEh9CjvnxVws_9g1cWMgmFS3EpaQEA3icC";

@ -242,7 +242,6 @@ class MusicViewModel {
for (var capsule in capsulesData) {
var music = musics.firstWhere((music) => music.id == capsule.item2);
print(capsule.item1);
capsules.add(Tuple2(capsule.item1, music));
}
return capsules;

@ -1,6 +1,7 @@
import 'dart:io';
import 'package:justmusic/model/Post.dart';
import 'package:justmusic/services/CapsuleService.dart';
import 'package:justmusic/services/PostService.dart';
import 'package:tuple/tuple.dart';
@ -11,7 +12,10 @@ import '../model/mapper/PostMapper.dart';
class PostViewModel {
List<Post> _postsFriends = [];
List<Post> _bestPosts = [];
var lastPostFriend;
var lastPostDiscovery;
final PostService _postService = PostService();
final CapsuleService _capsuleService = CapsuleService();
// Constructor
PostViewModel();
@ -26,10 +30,10 @@ class PostViewModel {
await _postService.createPost(description, idMusic, image, location);
}
Future<List<Post>> getPostsFriends() async {
Future<List<Post>> getPostsFriends({int limit = 10}) async {
try {
_postsFriends = [];
var responseData = await _postService.getPostsFriends();
var responseData = await _postService.getPostsFriends(limit);
List<String> ids = [];
var postsFutures = responseData.map((value) {
ids.add(value.data()["song_id"]);
@ -40,7 +44,7 @@ class PostViewModel {
for (int i = 0; i < posts.length; i++) {
posts[i].music = musics[i];
}
_postsFriends = posts;
_postsFriends.addAll(posts);
return _postsFriends;
} catch (e) {
print(e);
@ -49,13 +53,29 @@ class PostViewModel {
}
}
List<Post> getMorePostsFriends() {
throw new Error();
void getMorePostsFriends({int limit = 10}) async {
try {
var responseData = await _postService.getMorePostsFriends(limit);
List<String> ids = [];
var postsFutures = responseData.map((value) {
ids.add(value.data()["song_id"]);
return PostMapper.toModel(value);
}).toList();
var posts = await Future.wait(postsFutures);
List<Music> musics = await MyApp.musicViewModel.getMusicsWithIds(ids);
for (int i = 0; i < posts.length; i++) {
posts[i].music = musics[i];
}
_postsFriends.addAll(posts);
} catch (e) {
print(e);
}
}
Future<List<Post>> getBestPosts() async {
Future<List<Post>> getBestPosts({int limit = 10}) async {
try {
var responseData = await _postService.getPopularPosts();
_bestPosts = [];
var responseData = await _postService.getPopularPosts(limit);
List<String> ids = [];
var postsFutures = responseData.map((value) async {
ids.add(value.data()["song_id"]);
@ -66,7 +86,7 @@ class PostViewModel {
for (int i = 0; i < posts.length; i++) {
posts[i].music = musics[i];
}
_bestPosts = posts;
_bestPosts.addAll(posts);
return _bestPosts;
} catch (e) {
print(e);
@ -75,13 +95,28 @@ class PostViewModel {
}
}
List<Post> getMoreBestPosts() {
throw new Error();
void getMoreBestPosts({int limit = 10}) async {
try {
var responseData = await _postService.getMorePopularPosts(limit);
List<String> ids = [];
var postsFutures = responseData.map((value) async {
ids.add(value.data()["song_id"]);
return await PostMapper.toModel(value);
}).toList();
var posts = await Future.wait(postsFutures);
List<Music> musics = await MyApp.musicViewModel.getMusicsWithIds(ids);
for (int i = 0; i < posts.length; i++) {
posts[i].music = musics[i];
}
_bestPosts.addAll(posts);
} catch (e) {
print(e);
}
}
Future<List<bool>> recapSevenDays(String id) async {
try {
return await _postService.recapSevenDays(id);
return await _capsuleService.recapSevenDays(id);
} catch (e) {
print(e);
rethrow;
@ -112,7 +147,6 @@ class PostViewModel {
print(bool);
return bool;
} catch (e) {
print("haaaaaaaaa");
rethrow;
}
}

@ -61,58 +61,58 @@ packages:
dependency: "direct main"
description:
name: audioplayers
sha256: "61583554386721772f9309f509e17712865b38565a903c761f96b1115a979282"
sha256: c05c6147124cd63e725e861335a8b4d57300b80e6e92cea7c145c739223bbaef
url: "https://pub.dev"
source: hosted
version: "4.1.0"
version: "5.2.1"
audioplayers_android:
dependency: transitive
description:
name: audioplayers_android
sha256: dbdc9b7f2aa2440314c638aa55aadd45c7705e8340d5eddf2e3fb8da32d4ae2c
sha256: b00e1a0e11365d88576320ec2d8c192bc21f1afb6c0e5995d1c57ae63156acb5
url: "https://pub.dev"
source: hosted
version: "3.0.2"
version: "4.0.3"
audioplayers_darwin:
dependency: transitive
description:
name: audioplayers_darwin
sha256: "6aea96df1d12f7ad5a71d88c6d1b22a216211a9564219920124c16768e456e9d"
sha256: "3034e99a6df8d101da0f5082dcca0a2a99db62ab1d4ddb3277bed3f6f81afe08"
url: "https://pub.dev"
source: hosted
version: "4.1.0"
version: "5.0.2"
audioplayers_linux:
dependency: transitive
description:
name: audioplayers_linux
sha256: "396b62ac62c92dd26c3bc5106583747f57a8b325ebd2b41e5576f840cfc61338"
sha256: "60787e73fefc4d2e0b9c02c69885402177e818e4e27ef087074cf27c02246c9e"
url: "https://pub.dev"
source: hosted
version: "2.1.0"
version: "3.1.0"
audioplayers_platform_interface:
dependency: transitive
description:
name: audioplayers_platform_interface
sha256: f7daaed4659143094151ecf6bacd927d29ab8acffba98c110c59f0b81ae51143
sha256: "365c547f1bb9e77d94dd1687903a668d8f7ac3409e48e6e6a3668a1ac2982adb"
url: "https://pub.dev"
source: hosted
version: "5.0.1"
version: "6.1.0"
audioplayers_web:
dependency: transitive
description:
name: audioplayers_web
sha256: ec84fd46eed1577148ed4113f5998a36a18da4fce7170c37ce3e21b631393339
sha256: "22cd0173e54d92bd9b2c80b1204eb1eb159ece87475ab58c9788a70ec43c2a62"
url: "https://pub.dev"
source: hosted
version: "3.1.0"
version: "4.1.0"
audioplayers_windows:
dependency: transitive
description:
name: audioplayers_windows
sha256: "1d3aaac98a192b8488167711ba1e67d8b96333e8d0572ede4e2912e5bbce69a3"
sha256: "9536812c9103563644ada2ef45ae523806b0745f7a78e89d1b5fb1951de90e1a"
url: "https://pub.dev"
source: hosted
version: "2.0.2"
version: "3.1.0"
auto_size_text:
dependency: "direct main"
description:
@ -161,6 +161,14 @@ packages:
url: "https://pub.dev"
source: hosted
version: "1.3.0"
checked_yaml:
dependency: transitive
description:
name: checked_yaml
sha256: feb6bed21949061731a7a75fc5d2aa727cf160b91af9a3e464c5e3a32e28b5ff
url: "https://pub.dev"
source: hosted
version: "2.0.3"
circular_reveal_animation:
dependency: "direct main"
description:
@ -169,6 +177,14 @@ packages:
url: "https://pub.dev"
source: hosted
version: "2.0.1"
cli_util:
dependency: transitive
description:
name: cli_util
sha256: b8db3080e59b2503ca9e7922c3df2072cf13992354d5e944074ffa836fba43b7
url: "https://pub.dev"
source: hosted
version: "0.4.0"
clock:
dependency: transitive
description:
@ -205,10 +221,10 @@ packages:
dependency: transitive
description:
name: collection
sha256: "4a07be6cb69c84d677a6c3096fcf960cc3285a8330b4603e0d463d15d9bd934c"
sha256: ee67cb0715911d28db6bf4af1026078bd6f0128b07a5f66fb2ed94ec6783c09a
url: "https://pub.dev"
source: hosted
version: "1.17.1"
version: "1.18.0"
convert:
dependency: transitive
description:
@ -494,6 +510,14 @@ packages:
url: "https://pub.dev"
source: hosted
version: "1.0.0"
flutter_launcher_icons:
dependency: "direct main"
description:
name: flutter_launcher_icons
sha256: "526faf84284b86a4cb36d20a5e45147747b7563d921373d4ee0559c54fcdbcea"
url: "https://pub.dev"
source: hosted
version: "0.13.1"
flutter_lints:
dependency: "direct dev"
description:
@ -552,6 +576,14 @@ packages:
url: "https://pub.dev"
source: hosted
version: "9.2.0"
fullscreen_window:
dependency: "direct main"
description:
name: fullscreen_window
sha256: fe3014f91bff16a82d142ba9d834980b8a84b4bb03347a92588d389ad92bd1d3
url: "https://pub.dev"
source: hosted
version: "1.0.4"
geolocator:
dependency: "direct main"
description:
@ -604,10 +636,10 @@ packages:
dependency: "direct main"
description:
name: google_fonts
sha256: "6b6f10f0ce3c42f6552d1c70d2c28d764cf22bb487f50f66cca31dcd5194f4d6"
sha256: f0b8d115a13ecf827013ec9fc883390ccc0e87a96ed5347a3114cac177ef18e8
url: "https://pub.dev"
source: hosted
version: "4.0.4"
version: "6.1.0"
google_identity_services_web:
dependency: transitive
description:
@ -676,10 +708,10 @@ packages:
dependency: "direct main"
description:
name: http
sha256: "5895291c13fa8a3bd82e76d5627f69e0d85ca6a30dcac95c4ea19a5d555879c2"
sha256: "759d1a329847dd0f39226c688d3e06a6b8679668e350e2891a6474f8b4bb8525"
url: "https://pub.dev"
source: hosted
version: "0.13.6"
version: "1.1.0"
http_parser:
dependency: transitive
description:
@ -688,14 +720,22 @@ packages:
url: "https://pub.dev"
source: hosted
version: "4.0.2"
image:
dependency: transitive
description:
name: image
sha256: a72242c9a0ffb65d03de1b7113bc4e189686fc07c7147b8b41811d0dd0e0d9bf
url: "https://pub.dev"
source: hosted
version: "4.0.17"
image_picker:
dependency: "direct main"
description:
name: image_picker
sha256: "6296e98782726d37f59663f0727d0e978eee1ced1ffed45ccaba591786a7f7b3"
sha256: "7d7f2768df2a8b0a3cefa5ef4f84636121987d403130e70b17ef7e2cf650ba84"
url: "https://pub.dev"
source: hosted
version: "1.0.1"
version: "1.0.4"
image_picker_android:
dependency: transitive
description:
@ -708,10 +748,10 @@ packages:
dependency: transitive
description:
name: image_picker_for_web
sha256: "869fe8a64771b7afbc99fc433a5f7be2fea4d1cb3d7c11a48b6b579eb9c797f0"
sha256: "50bc9ae6a77eea3a8b11af5eb6c661eeb858fdd2f734c2a4fd17086922347ef7"
url: "https://pub.dev"
source: hosted
version: "2.2.0"
version: "3.0.1"
image_picker_ios:
dependency: transitive
description:
@ -784,6 +824,14 @@ packages:
url: "https://pub.dev"
source: hosted
version: "0.6.7"
json_annotation:
dependency: transitive
description:
name: json_annotation
sha256: b10a7b2ff83d83c777edba3c6a0f97045ddadd56c944e1a23a3fdf43a1bf4467
url: "https://pub.dev"
source: hosted
version: "4.8.1"
lints:
dependency: transitive
description:
@ -804,26 +852,26 @@ packages:
dependency: transitive
description:
name: matcher
sha256: "6501fbd55da300384b768785b83e5ce66991266cec21af89ab9ae7f5ce1c4cbb"
sha256: "1803e76e6653768d64ed8ff2e1e67bea3ad4b923eb5c56a295c3e634bad5960e"
url: "https://pub.dev"
source: hosted
version: "0.12.15"
version: "0.12.16"
material_color_utilities:
dependency: transitive
description:
name: material_color_utilities
sha256: d92141dc6fe1dad30722f9aa826c7fbc896d021d792f80678280601aff8cf724
sha256: "9528f2f296073ff54cb9fee677df673ace1218163c3bc7628093e7eed5203d41"
url: "https://pub.dev"
source: hosted
version: "0.2.0"
version: "0.5.0"
meta:
dependency: transitive
description:
name: meta
sha256: "3c74dbf8763d36539f114c799d8a2d87343b5067e9d796ca22b5eb8437090ee3"
sha256: a6e590c838b18133bb482a2745ad77c5bb7715fb0451209e1a7567d416678b8e
url: "https://pub.dev"
source: hosted
version: "1.9.1"
version: "1.10.0"
mime:
dependency: transitive
description:
@ -993,10 +1041,10 @@ packages:
dependency: transitive
description:
name: source_span
sha256: dd904f795d4b4f3b870833847c461801f6750a9fa8e61ea5ac53f9422b31f250
sha256: "53e943d4206a5e30df338fd4c6e7a077e02254531b138a15aec3bd143c1a8b3c"
url: "https://pub.dev"
source: hosted
version: "1.9.1"
version: "1.10.0"
sqflite:
dependency: transitive
description:
@ -1017,18 +1065,18 @@ packages:
dependency: transitive
description:
name: stack_trace
sha256: c3c7d8edb15bee7f0f74debd4b9c5f3c2ea86766fe4178eb2a18eb30a0bdaed5
sha256: "73713990125a6d93122541237550ee3352a2d84baad52d375a4cad2eb9b7ce0b"
url: "https://pub.dev"
source: hosted
version: "1.11.0"
version: "1.11.1"
stream_channel:
dependency: transitive
description:
name: stream_channel
sha256: "83615bee9045c1d322bbbd1ba209b7a749c2cbcdcb3fdd1df8eb488b3279c1c8"
sha256: ba2aa5d8cc609d96bbb2899c28934f9e1af5cddbd60a827822ea467161eb54e7
url: "https://pub.dev"
source: hosted
version: "2.1.1"
version: "2.1.2"
string_scanner:
dependency: transitive
description:
@ -1057,10 +1105,10 @@ packages:
dependency: transitive
description:
name: test_api
sha256: eb6ac1540b26de412b3403a163d919ba86f6a973fe6cc50ae3541b80092fdcfb
sha256: "5c2f730018264d276c20e4f1503fd1308dfbbae39ec8ee63c5236311ac06954b"
url: "https://pub.dev"
source: hosted
version: "0.5.1"
version: "0.6.1"
text_scroll:
dependency: "direct main"
description:
@ -1141,6 +1189,14 @@ packages:
url: "https://pub.dev"
source: hosted
version: "2.1.4"
web:
dependency: transitive
description:
name: web
sha256: afe077240a270dcfd2aafe77602b4113645af95d0ad31128cc02bce5ac5d5152
url: "https://pub.dev"
source: hosted
version: "0.3.0"
win32:
dependency: transitive
description:
@ -1165,6 +1221,14 @@ packages:
url: "https://pub.dev"
source: hosted
version: "6.3.0"
yaml:
dependency: transitive
description:
name: yaml
sha256: "75769501ea3489fca56601ff33454fe45507ea3bfb014161abc3b43ae25989d5"
url: "https://pub.dev"
source: hosted
version: "3.1.2"
zoom_tap_animation:
dependency: "direct main"
description:
@ -1174,5 +1238,5 @@ packages:
source: hosted
version: "1.1.0"
sdks:
dart: ">=3.0.0 <4.0.0"
dart: ">=3.2.0-194.0.dev <4.0.0"
flutter: ">=3.10.0"

@ -20,7 +20,7 @@ publish_to: 'none' # Remove this line if you wish to publish to pub.dev
version: 1.0.2+12
environment:
sdk: '>=2.18.2 <3.0.0'
sdk: '>=3.1.4 <4.0.0'
# Dependencies specify other packages that your package needs in order to work.
# To automatically upgrade your package dependencies to the latest versions
@ -31,13 +31,13 @@ environment:
dependencies:
flutter:
sdk: flutter
http: ^0.13.5
http: ^1.1.0
# The following adds the Cupertino Icons font to your application.
# Use with the CupertinoIcons class for iOS style icons.
cupertino_icons: ^1.0.2
google_fonts: ^4.0.4
google_fonts: ^6.1.0
gradiantbutton: ^0.0.1
smooth_corner: ^1.1.0
flutter_signin_button: ^2.0.0
@ -50,7 +50,7 @@ dependencies:
custom_draggable_widget: ^0.0.2
modal_bottom_sheet: ^2.1.2
flutter_animated_play_button: ^0.3.0
audioplayers: ^4.1.0
audioplayers: ^5.2.1
ionicons: ^0.2.2
top_snackbar_flutter: ^3.1.0
firebase_core: ^2.15.0
@ -76,6 +76,8 @@ dependencies:
firebase_messaging: ^14.6.5
cached_network_image: ^3.2.3
google_sign_in: ^6.1.4
flutter_launcher_icons: ^0.13.1
fullscreen_window: ^1.0.3
dev_dependencies:
flutter_test:
@ -88,6 +90,14 @@ dev_dependencies:
# rules and activating additional ones.
flutter_lints: ^2.0.0
flutter_launcher_icons:
android: "launcher_icon"
ios: true
image_path: "assets/images/logo-JustMusic.png"
remove_alpha_ios: true
min_sdk_android: 21 # android min sdk min:16, default 21
# For information on the generic Dart part of this file, see the
# following page: https://dart.dev/tools/pub/pubspec

Binary file not shown.

After

Width:  |  Height:  |  Size: 480 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 41 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 41 KiB

@ -0,0 +1,81 @@
<!DOCTYPE html>
<html>
<head>
<!--
If you are serving your web app in a path other than the root, change the
href value below to reflect the base path you are serving from.
The path provided below has to start and end with a slash "/" in order for
it to work correctly.
For more details:
* https://developer.mozilla.org/en-US/docs/Web/HTML/Element/base
This is a placeholder for base href that will be replaced by the value of
the `--base-href` argument provided to `flutter build`.
-->
<base href="$FLUTTER_BASE_HREF">
<meta charset="UTF-8">
<meta content="IE=Edge" http-equiv="X-UA-Compatible">
<meta name="description" content="A new Flutter project.">
<meta name="google-signin-client_id" content="994903990520-pravk8o6o9ehkhe6asjrao4fmlve0lel.apps.googleusercontent.com">
<!-- iOS meta tags & icons -->
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-status-bar-style" content="black">
<meta name="apple-mobile-web-app-title" content="justmusic">
<link rel="apple-touch-icon" href="icons/icon-192.png">
<!-- Favicon -->
<link rel="icon" type="image/png" href="favicon.png"/>
<title>justmusic</title>
<link rel="manifest" href="manifest.json">
<script>
// The value below is injected by flutter build, do not touch.
const serviceWorkerVersion = null;
</script>
<!-- This script adds the flutter initialization JS code -->
<script src="flutter.js" defer></script>
</head>
<body>
<script>
window.addEventListener('load', function(ev) {
// Download main.dart.js
_flutter.loader.loadEntrypoint({
serviceWorker: {
serviceWorkerVersion: serviceWorkerVersion,
},
onEntrypointLoaded: function(engineInitializer) {
engineInitializer.initializeEngine().then(function(appRunner) {
appRunner.runApp();
});
}
});
});
</script>
</body>
</html>
<style>
/* Centers flutter canvas with a size of the viewport*/
flt-glass-pane {
position: fixed !important; /* Overrides absolute from flutter */
top: 50vh !important;
left: 50vw !important;
max-width: 100vw !important;
max-height: 100vh !important;
transform: translate(-50vw, -50vh) !important;
}
/*
Scrollbar hide doesn't work on iOS, they add a default one when overflow:true and -webkit-overflow-scrolling: touch;
Sadly since iOS 13, this value is forced on iOS -> https://developer.apple.com/documentation/safari-release-notes/safari-13-release-notes
*/
::-webkit-scrollbar {
display: false;
width: 0px;
height: 0px; /* Remove scrollbar space */
background: transparent; /* Optional: just make scrollbar invisible */
}
</style>

@ -0,0 +1,35 @@
{
"name": "justmusic",
"short_name": "justmusic",
"start_url": ".",
"display": "standalone",
"background_color": "#0175C2",
"theme_color": "#0175C2",
"description": "A new Flutter project.",
"orientation": "portrait-primary",
"prefer_related_applications": false,
"icons": [
{
"src": "icons/Icon-192.png",
"sizes": "192x192",
"type": "image/png"
},
{
"src": "icons/Icon-512.png",
"sizes": "512x512",
"type": "image/png"
},
{
"src": "icons/Icon-maskable-192.png",
"sizes": "192x192",
"type": "image/png",
"purpose": "maskable"
},
{
"src": "icons/Icon-maskable-512.png",
"sizes": "512x512",
"type": "image/png",
"purpose": "maskable"
}
]
}
Loading…
Cancel
Save