diff --git a/.DS_Store b/.DS_Store
new file mode 100644
index 0000000..f77a5ea
Binary files /dev/null and b/.DS_Store differ
diff --git a/.drone.yml b/.drone.yml
index 6a35e64..d3cf9a5 100644
--- a/.drone.yml
+++ b/.drone.yml
@@ -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
@@ -25,4 +39,5 @@ steps:
- unzip -o $HOME/.sonar/sonar-scanner.zip -d $HOME/.sonar/
- export PATH=$SONAR_SCANNER_HOME/bin:$PATH
- export SONAR_SCANNER_OPTS="-server"
- - sonar-scanner -D sonar.projectKey=JustMusic -D sonar.sources=./Sources/justMUSIC -D sonar.host.url=https://codefirst.iut.uca.fr/sonar
\ No newline at end of file
+ - 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]
\ No newline at end of file
diff --git a/.idea/Project_JustMusic.iml b/.idea/Project_JustMusic.iml
index 6d1b1bf..3182939 100644
--- a/.idea/Project_JustMusic.iml
+++ b/.idea/Project_JustMusic.iml
@@ -81,6 +81,75 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/.idea/libraries/Dart_Packages.xml b/.idea/libraries/Dart_Packages.xml
index 2e5400f..7144452 100644
--- a/.idea/libraries/Dart_Packages.xml
+++ b/.idea/libraries/Dart_Packages.xml
@@ -180,7 +180,7 @@
-
+
@@ -362,7 +362,7 @@
-
+
@@ -474,14 +474,14 @@
-
+
-
+
@@ -726,7 +726,7 @@
-
+
@@ -859,7 +859,7 @@
-
+
@@ -901,14 +901,14 @@
-
+
-
+
@@ -936,7 +936,7 @@
-
+
@@ -1013,7 +1013,7 @@
-
+
@@ -1073,7 +1073,7 @@
-
+
@@ -1148,7 +1148,7 @@
-
+
@@ -1172,12 +1172,12 @@
-
-
+
+
-
+
@@ -1188,15 +1188,15 @@
-
+
-
-
-
-
+
+
+
+
diff --git a/.idea/libraries/Dart_SDK.xml b/.idea/libraries/Dart_SDK.xml
index df2867e..5e61716 100644
--- a/.idea/libraries/Dart_SDK.xml
+++ b/.idea/libraries/Dart_SDK.xml
@@ -1,26 +1,27 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/Documentation/Diagrammes/JMClasses.png b/Documentation/Diagrammes/JMClasses.png
new file mode 100644
index 0000000..29ec18d
Binary files /dev/null and b/Documentation/Diagrammes/JMClasses.png differ
diff --git a/Documentation/Images/Overview.png b/Documentation/Images/Overview.png
new file mode 100644
index 0000000..a5d312a
Binary files /dev/null and b/Documentation/Images/Overview.png differ
diff --git a/README.md b/README.md
index 6fc3186..b5889cb 100644
--- a/README.md
+++ b/README.md
@@ -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
+
+
+

+
+
+
+### 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] 
- [x] 
+- [x] 
## Techniciens
diff --git a/Sources/.DS_Store b/Sources/.DS_Store
new file mode 100644
index 0000000..957a0f5
Binary files /dev/null and b/Sources/.DS_Store differ
diff --git a/Sources/justMUSIC/.firebaserc b/Sources/justMUSIC/.firebaserc
new file mode 100644
index 0000000..3e57bea
--- /dev/null
+++ b/Sources/justMUSIC/.firebaserc
@@ -0,0 +1,5 @@
+{
+ "projects": {
+ "default": "justmusic-435d5"
+ }
+}
diff --git a/Sources/justMUSIC/.metadata b/Sources/justMUSIC/.metadata
index 45aa6a7..d22992e 100644
--- a/Sources/justMUSIC/.metadata
+++ b/Sources/justMUSIC/.metadata
@@ -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
diff --git a/Sources/justMUSIC/assets/images/logo-JustMusic.png b/Sources/justMUSIC/assets/images/logo-JustMusic.png
new file mode 100644
index 0000000..661cb4f
Binary files /dev/null and b/Sources/justMUSIC/assets/images/logo-JustMusic.png differ
diff --git a/Sources/justMUSIC/firebase.json b/Sources/justMUSIC/firebase.json
new file mode 100644
index 0000000..60df67a
--- /dev/null
+++ b/Sources/justMUSIC/firebase.json
@@ -0,0 +1,17 @@
+{
+ "hosting": {
+ "site": "justmusic-435d5",
+ "public": "build/web",
+ "ignore": [
+ "firebase.json",
+ "**/.*",
+ "**/node_modules/**"
+ ],
+ "rewrites": [
+ {
+ "source": "**",
+ "destination": "/index.html"
+ }
+ ]
+ }
+}
diff --git a/Sources/justMUSIC/ios/Podfile b/Sources/justMUSIC/ios/Podfile
index fdcc671..2c6a9b8 100644
--- a/Sources/justMUSIC/ios/Podfile
+++ b/Sources/justMUSIC/ios/Podfile
@@ -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'
diff --git a/Sources/justMUSIC/ios/Podfile.lock b/Sources/justMUSIC/ios/Podfile.lock
index 879088f..5315664 100644
--- a/Sources/justMUSIC/ios/Podfile.lock
+++ b/Sources/justMUSIC/ios/Podfile.lock
@@ -953,6 +953,6 @@ SPEC CHECKSUMS:
PromisesObjC: c50d2056b5253dadbd6c2bea79b0674bd5a52fa4
sqflite: 31f7eba61e3074736dff8807a9b41581e4f7f15a
-PODFILE CHECKSUM: 70d9d25280d0dd177a5f637cdb0f0b0b12c6a189
+PODFILE CHECKSUM: 6b9eb94e9f98a329f2ef624b852a6e42d090af2b
-COCOAPODS: 1.12.1
+COCOAPODS: 1.14.3
diff --git a/Sources/justMUSIC/ios/Runner.xcodeproj/project.pbxproj b/Sources/justMUSIC/ios/Runner.xcodeproj/project.pbxproj
index 74017c1..8154f33 100644
--- a/Sources/justMUSIC/ios/Runner.xcodeproj/project.pbxproj
+++ b/Sources/justMUSIC/ios/Runner.xcodeproj/project.pbxproj
@@ -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 = ""; };
97C147021CF9000F007C117D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; };
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 = ""; };
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 = ""; };
/* 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";
diff --git a/Sources/justMUSIC/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png b/Sources/justMUSIC/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png
index dc9ada4..383bdc5 100644
Binary files a/Sources/justMUSIC/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png and b/Sources/justMUSIC/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png differ
diff --git a/Sources/justMUSIC/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png b/Sources/justMUSIC/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png
index 7353c41..cafa7dd 100644
Binary files a/Sources/justMUSIC/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png and b/Sources/justMUSIC/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png differ
diff --git a/Sources/justMUSIC/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png b/Sources/justMUSIC/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png
index 797d452..34f7675 100644
Binary files a/Sources/justMUSIC/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png and b/Sources/justMUSIC/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png differ
diff --git a/Sources/justMUSIC/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png b/Sources/justMUSIC/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png
index 6ed2d93..18b3a56 100644
Binary files a/Sources/justMUSIC/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png and b/Sources/justMUSIC/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png differ
diff --git a/Sources/justMUSIC/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png b/Sources/justMUSIC/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png
index 4cd7b00..33224da 100644
Binary files a/Sources/justMUSIC/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png and b/Sources/justMUSIC/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png differ
diff --git a/Sources/justMUSIC/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png b/Sources/justMUSIC/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png
index fe73094..a528cc2 100644
Binary files a/Sources/justMUSIC/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png and b/Sources/justMUSIC/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png differ
diff --git a/Sources/justMUSIC/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png b/Sources/justMUSIC/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png
index 321773c..53a0d73 100644
Binary files a/Sources/justMUSIC/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png and b/Sources/justMUSIC/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png differ
diff --git a/Sources/justMUSIC/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png b/Sources/justMUSIC/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png
index 797d452..34f7675 100644
Binary files a/Sources/justMUSIC/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png and b/Sources/justMUSIC/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png differ
diff --git a/Sources/justMUSIC/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png b/Sources/justMUSIC/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png
index 502f463..8241dc1 100644
Binary files a/Sources/justMUSIC/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png and b/Sources/justMUSIC/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png differ
diff --git a/Sources/justMUSIC/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png b/Sources/justMUSIC/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png
index 0ec3034..319eeba 100644
Binary files a/Sources/justMUSIC/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png and b/Sources/justMUSIC/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png differ
diff --git a/Sources/justMUSIC/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png b/Sources/justMUSIC/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png
index 0ec3034..319eeba 100644
Binary files a/Sources/justMUSIC/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png and b/Sources/justMUSIC/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png differ
diff --git a/Sources/justMUSIC/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png b/Sources/justMUSIC/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png
index e9f5fea..8011b7f 100644
Binary files a/Sources/justMUSIC/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png and b/Sources/justMUSIC/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png differ
diff --git a/Sources/justMUSIC/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png b/Sources/justMUSIC/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png
index 84ac32a..58eedb4 100644
Binary files a/Sources/justMUSIC/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png and b/Sources/justMUSIC/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png differ
diff --git a/Sources/justMUSIC/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png b/Sources/justMUSIC/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png
index 8953cba..daad22d 100644
Binary files a/Sources/justMUSIC/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png and b/Sources/justMUSIC/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png differ
diff --git a/Sources/justMUSIC/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png b/Sources/justMUSIC/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png
index 0467bf1..18e0bd2 100644
Binary files a/Sources/justMUSIC/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png and b/Sources/justMUSIC/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png differ
diff --git a/Sources/justMUSIC/ios/Runner/GoogleService-Info.plist b/Sources/justMUSIC/ios/Runner/GoogleService-Info.plist
new file mode 100644
index 0000000..661063e
--- /dev/null
+++ b/Sources/justMUSIC/ios/Runner/GoogleService-Info.plist
@@ -0,0 +1,36 @@
+
+
+
+
+ CLIENT_ID
+ 994903990520-n6jd98ena56kb1tvtrd67tvb5et3nfbf.apps.googleusercontent.com
+ REVERSED_CLIENT_ID
+ com.googleusercontent.apps.994903990520-n6jd98ena56kb1tvtrd67tvb5et3nfbf
+ ANDROID_CLIENT_ID
+ 994903990520-073l30b0afj0uq7apsvc8p8ukantpu6q.apps.googleusercontent.com
+ API_KEY
+ AIzaSyBbYqsR6t7JTi8_XFNEHd43IRuKlYGeI3U
+ GCM_SENDER_ID
+ 994903990520
+ PLIST_VERSION
+ 1
+ BUNDLE_ID
+ com.example.justmusic
+ PROJECT_ID
+ justmusic-435d5
+ STORAGE_BUCKET
+ justmusic-435d5.appspot.com
+ IS_ADS_ENABLED
+
+ IS_ANALYTICS_ENABLED
+
+ IS_APPINVITE_ENABLED
+
+ IS_GCM_ENABLED
+
+ IS_SIGNIN_ENABLED
+
+ GOOGLE_APP_ID
+ 1:994903990520:ios:93188f32e320babe0a9b0d
+
+
\ No newline at end of file
diff --git a/Sources/justMUSIC/ios/Runner/Info.plist b/Sources/justMUSIC/ios/Runner/Info.plist
index 64cb62f..6139f47 100644
--- a/Sources/justMUSIC/ios/Runner/Info.plist
+++ b/Sources/justMUSIC/ios/Runner/Info.plist
@@ -2,6 +2,8 @@
+ CADisableMinimumFrameDurationOnPhone
+
CFBundleDevelopmentRegion
$(DEVELOPMENT_LANGUAGE)
CFBundleDisplayName
@@ -20,10 +22,31 @@
$(FLUTTER_BUILD_NAME)
CFBundleSignature
????
+ CFBundleURLTypes
+
+
+ CFBundleTypeRole
+ Editor
+ CFBundleURLSchemes
+
+ com.googleusercontent.apps.994903990520-n6jd98ena56kb1tvtrd67tvb5et3nfbf
+
+
+
CFBundleVersion
$(FLUTTER_BUILD_NUMBER)
LSRequiresIPhoneOS
+ NSCameraUsageDescription
+ To capture profile photo please grant camera access
+ NSLocationAlwaysUsageDescription
+ Votre message d'autorisation pour une utilisation continue de la localisation
+ NSLocationWhenInUseUsageDescription
+ Votre message d'autorisation lorsque l'application est en cours d'utilisation
+ NSPhotoLibraryUsageDescription
+ App needs access to photo lib for profile images
+ UIApplicationSupportsIndirectInputEvents
+
UILaunchStoryboardName
LaunchScreen
UIMainStoryboardFile
@@ -41,15 +64,5 @@
UIInterfaceOrientationLandscapeLeft
UIInterfaceOrientationLandscapeRight
- CADisableMinimumFrameDurationOnPhone
-
- UIApplicationSupportsIndirectInputEvents
-
- NSPhotoLibraryUsageDescription
- App needs access to photo lib for profile images
-
- NSCameraUsageDescription
- To capture profile photo please grant camera access
-
diff --git a/Sources/justMUSIC/lib/components/back_button.dart b/Sources/justMUSIC/lib/components/back_button.dart
index 5e771fa..9baf5bd 100644
--- a/Sources/justMUSIC/lib/components/back_button.dart
+++ b/Sources/justMUSIC/lib/components/back_button.dart
@@ -1,4 +1,4 @@
-import 'package:flutter/Material.dart';
+import 'package:flutter/material.dart';
import '../values/constants.dart';
diff --git a/Sources/justMUSIC/lib/components/buttonPostComponent.dart b/Sources/justMUSIC/lib/components/buttonPostComponent.dart
index 28c4587..52be309 100644
--- a/Sources/justMUSIC/lib/components/buttonPostComponent.dart
+++ b/Sources/justMUSIC/lib/components/buttonPostComponent.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';
diff --git a/Sources/justMUSIC/lib/components/button_play_component.dart b/Sources/justMUSIC/lib/components/button_play_component.dart
index a8b45bb..0afc61c 100644
--- a/Sources/justMUSIC/lib/components/button_play_component.dart
+++ b/Sources/justMUSIC/lib/components/button_play_component.dart
@@ -1,4 +1,4 @@
-import 'package:flutter/Material.dart';
+import 'package:flutter/material.dart';
import '../main.dart';
import '../model/Music.dart';
diff --git a/Sources/justMUSIC/lib/components/city_list_component.dart b/Sources/justMUSIC/lib/components/city_list_component.dart
index 59a2100..cfcaa24 100644
--- a/Sources/justMUSIC/lib/components/city_list_component.dart
+++ b/Sources/justMUSIC/lib/components/city_list_component.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';
diff --git a/Sources/justMUSIC/lib/components/comment_component.dart b/Sources/justMUSIC/lib/components/comment_component.dart
index a2c8965..23512d4 100644
--- a/Sources/justMUSIC/lib/components/comment_component.dart
+++ b/Sources/justMUSIC/lib/components/comment_component.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),
),
diff --git a/Sources/justMUSIC/lib/components/editable_post_component.dart b/Sources/justMUSIC/lib/components/editable_post_component.dart
index 635ebf5..cec93db 100644
--- a/Sources/justMUSIC/lib/components/editable_post_component.dart
+++ b/Sources/justMUSIC/lib/components/editable_post_component.dart
@@ -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 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 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 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 with Tick
),
),
),
- SizedBox(
+ kIsWeb?Container():SizedBox(
width: 15,
),
Expanded(
@@ -284,6 +291,7 @@ class _EditablePostComponentState extends State with Tick
child: SizedBox(
width: double.infinity,
child: TextFormField(
+ keyboardType: TextInputType.text,
onChanged: (value) {
_updateDescription(value);
},
diff --git a/Sources/justMUSIC/lib/components/historic_component.dart b/Sources/justMUSIC/lib/components/historic_component.dart
index db18e71..a5d7146 100644
--- a/Sources/justMUSIC/lib/components/historic_component.dart
+++ b/Sources/justMUSIC/lib/components/historic_component.dart
@@ -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 {
.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? 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? 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();
diff --git a/Sources/justMUSIC/lib/components/little_post_recap_component.dart b/Sources/justMUSIC/lib/components/little_post_recap_component.dart
index 2134adc..95c5ab4 100644
--- a/Sources/justMUSIC/lib/components/little_post_recap_component.dart
+++ b/Sources/justMUSIC/lib/components/little_post_recap_component.dart
@@ -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';
diff --git a/Sources/justMUSIC/lib/components/music_list_component.dart b/Sources/justMUSIC/lib/components/music_list_component.dart
index e4b6b2d..966a729 100644
--- a/Sources/justMUSIC/lib/components/music_list_component.dart
+++ b/Sources/justMUSIC/lib/components/music_list_component.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';
diff --git a/Sources/justMUSIC/lib/components/play_button_component.dart b/Sources/justMUSIC/lib/components/play_button_component.dart
index 9f4b21d..4aaff75 100644
--- a/Sources/justMUSIC/lib/components/play_button_component.dart
+++ b/Sources/justMUSIC/lib/components/play_button_component.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';
diff --git a/Sources/justMUSIC/lib/components/post_button_component.dart b/Sources/justMUSIC/lib/components/post_button_component.dart
index a82dd98..a6ea2ce 100644
--- a/Sources/justMUSIC/lib/components/post_button_component.dart
+++ b/Sources/justMUSIC/lib/components/post_button_component.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 {
diff --git a/Sources/justMUSIC/lib/components/post_component.dart b/Sources/justMUSIC/lib/components/post_component.dart
index e80649d..e8ead7f 100644
--- a/Sources/justMUSIC/lib/components/post_component.dart
+++ b/Sources/justMUSIC/lib/components/post_component.dart
@@ -29,21 +29,29 @@ class _PostComponentState extends State with TickerProviderStateM
choice = !choice;
});
}
+ String formatPostDate(DateTime postDate) {
+ DateTime now = DateTime.now();
+ DateTime yesterday = DateTime(now.year, now.month, now.day - 1);
- final List 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 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 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 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 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",
),
),
),
diff --git a/Sources/justMUSIC/lib/components/profil_picture_component.dart b/Sources/justMUSIC/lib/components/profil_picture_component.dart
index 48b734a..d35a8d8 100644
--- a/Sources/justMUSIC/lib/components/profil_picture_component.dart
+++ b/Sources/justMUSIC/lib/components/profil_picture_component.dart
@@ -1,4 +1,4 @@
-import 'package:flutter/Material.dart';
+import 'package:flutter/material.dart';
import '../config/routes.dart';
import '../model/User.dart';
diff --git a/Sources/justMUSIC/lib/components/profile_list_component.dart b/Sources/justMUSIC/lib/components/profile_list_component.dart
index 9201a0c..1dd56e9 100644
--- a/Sources/justMUSIC/lib/components/profile_list_component.dart
+++ b/Sources/justMUSIC/lib/components/profile_list_component.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';
diff --git a/Sources/justMUSIC/lib/components/recap_component.dart b/Sources/justMUSIC/lib/components/recap_component.dart
index d7ce67e..386484b 100644
--- a/Sources/justMUSIC/lib/components/recap_component.dart
+++ b/Sources/justMUSIC/lib/components/recap_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;
diff --git a/Sources/justMUSIC/lib/components/search_bar_component.dart b/Sources/justMUSIC/lib/components/search_bar_component.dart
index ca7cf9b..cca7594 100644
--- a/Sources/justMUSIC/lib/components/search_bar_component.dart
+++ b/Sources/justMUSIC/lib/components/search_bar_component.dart
@@ -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';
diff --git a/Sources/justMUSIC/lib/components/top_nav_bar_component.dart b/Sources/justMUSIC/lib/components/top_nav_bar_component.dart
index 6d26dd1..488ff0e 100644
--- a/Sources/justMUSIC/lib/components/top_nav_bar_component.dart
+++ b/Sources/justMUSIC/lib/components/top_nav_bar_component.dart
@@ -135,10 +135,8 @@ class _TopNavBarComponentState extends State 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(
diff --git a/Sources/justMUSIC/lib/config/routes.dart b/Sources/justMUSIC/lib/config/routes.dart
index 4b36efa..a553584 100644
--- a/Sources/justMUSIC/lib/config/routes.dart
+++ b/Sources/justMUSIC/lib/config/routes.dart
@@ -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,
+ );
+ },
+ );
+}
diff --git a/Sources/justMUSIC/lib/main.dart b/Sources/justMUSIC/lib/main.dart
index a371898..bd974fd 100644
--- a/Sources/justMUSIC/lib/main.dart
+++ b/Sources/justMUSIC/lib/main.dart
@@ -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 main() async {
tz.initializeTimeZones();
@@ -39,7 +40,9 @@ Future 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 {
@override
void initState() {
+ FullScreenWindow.setFullScreen(true); // enter fullscreen
super.initState();
}
@@ -76,12 +80,13 @@ class _MyAppState extends State {
@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.userViewModel.userCurrent = userSnapshot.data!;
return FeedScreen();
} else {
- return const Text('User data not found');
+ return WellcomeScreen();
}
}
},
diff --git a/Sources/justMUSIC/lib/model/Capsule.dart b/Sources/justMUSIC/lib/model/Capsule.dart
new file mode 100644
index 0000000..0b4cc31
--- /dev/null
+++ b/Sources/justMUSIC/lib/model/Capsule.dart
@@ -0,0 +1,34 @@
+import 'package:tuple/tuple.dart';
+
+import 'Music.dart';
+
+class Capsule {
+ final String _id;
+ late Music _music;
+ Tuple2 _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 get location => _location;
+
+ set location(Tuple2 value) {
+ _location = value;
+ }
+
+ DateTime get date => _date;
+
+ set date(DateTime value) {
+ _date = value;
+ }
+}
diff --git a/Sources/justMUSIC/lib/screens/add_friend_screen.dart b/Sources/justMUSIC/lib/screens/add_friend_screen.dart
index 246e514..e5973de 100644
--- a/Sources/justMUSIC/lib/screens/add_friend_screen.dart
+++ b/Sources/justMUSIC/lib/screens/add_friend_screen.dart
@@ -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';
diff --git a/Sources/justMUSIC/lib/screens/capsule_historic_screen.dart b/Sources/justMUSIC/lib/screens/capsule_historic_screen.dart
index f1f7646..b50f908 100644
--- a/Sources/justMUSIC/lib/screens/capsule_historic_screen.dart
+++ b/Sources/justMUSIC/lib/screens/capsule_historic_screen.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 {
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 {
child: SizedBox(
width: double.infinity,
child: Container(
- padding: EdgeInsets.symmetric(horizontal: 15),
- constraints: BoxConstraints(maxWidth: 600),
child: Column(
children: [
HistoricComponent(
diff --git a/Sources/justMUSIC/lib/screens/change_password_screen.dart b/Sources/justMUSIC/lib/screens/change_password_screen.dart
index d9d8beb..8a89fca 100644
--- a/Sources/justMUSIC/lib/screens/change_password_screen.dart
+++ b/Sources/justMUSIC/lib/screens/change_password_screen.dart
@@ -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';
diff --git a/Sources/justMUSIC/lib/screens/detail_post_screen.dart b/Sources/justMUSIC/lib/screens/detail_post_screen.dart
index f1b8227..a2e378f 100644
--- a/Sources/justMUSIC/lib/screens/detail_post_screen.dart
+++ b/Sources/justMUSIC/lib/screens/detail_post_screen.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 {
}
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 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 {
},
child: Container(
height: 760.h,
+ color: bgAppBar,
child: Column(
children: [
Expanded(
@@ -118,156 +149,140 @@ class _DetailPostScreenState extends State {
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 {
),
)
: Container(
- height: 30,
+ height: 0,
),
Container(
width: double.infinity,
@@ -594,6 +609,7 @@ class _DetailPostScreenState extends State {
Expanded(
child: TextField(
keyboardAppearance: Brightness.dark,
+ keyboardType: TextInputType.text,
controller: _textController,
focusNode: myFocusNode,
onSubmitted: (value) async {
@@ -608,7 +624,6 @@ class _DetailPostScreenState extends State {
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 {
_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 {
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)),
),
diff --git a/Sources/justMUSIC/lib/screens/feed_screen.dart b/Sources/justMUSIC/lib/screens/feed_screen.dart
index 4ad8120..1a38fbd 100644
--- a/Sources/justMUSIC/lib/screens/feed_screen.dart
+++ b/Sources/justMUSIC/lib/screens/feed_screen.dart
@@ -25,13 +25,15 @@ class _FeedScreenState extends State with SingleTickerProviderStateM
late Animation animation;
late List friendFeed;
Timer? timer;
-
+ var pageFriend = 0;
late List discoveryFeed;
late Tuple2, List> displayFeed;
bool isDismissed = true;
bool choiceFeed = true;
PageController controller = PageController();
+
+
@override
void initState() {
super.initState();
@@ -124,9 +126,26 @@ class _FeedScreenState extends State 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 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 with SingleTickerProviderStateM
PostComponent(callback: openDetailPost, post: displayFeed.item1[index], index: index),
);
},
+
),
),
),
@@ -212,6 +233,7 @@ class _FeedScreenState extends State with SingleTickerProviderStateM
triggerMode: RefreshIndicatorTriggerMode.onEdge,
onRefresh: _refresh,
child: ListView.builder(
+ controller: _scrollController,
physics: const BouncingScrollPhysics(parent: AlwaysScrollableScrollPhysics()),
clipBehavior: Clip.none,
shrinkWrap: false,
diff --git a/Sources/justMUSIC/lib/screens/forget_password_screen.dart b/Sources/justMUSIC/lib/screens/forget_password_screen.dart
index f43c889..49fbd36 100644
--- a/Sources/justMUSIC/lib/screens/forget_password_screen.dart
+++ b/Sources/justMUSIC/lib/screens/forget_password_screen.dart
@@ -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 {
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";
diff --git a/Sources/justMUSIC/lib/screens/launching_rocker_screen.dart b/Sources/justMUSIC/lib/screens/launching_rocker_screen.dart
index 2195c80..fa45c7e 100644
--- a/Sources/justMUSIC/lib/screens/launching_rocker_screen.dart
+++ b/Sources/justMUSIC/lib/screens/launching_rocker_screen.dart
@@ -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';
diff --git a/Sources/justMUSIC/lib/screens/loading_screen.dart b/Sources/justMUSIC/lib/screens/loading_screen.dart
index e9bb106..777fbd6 100644
--- a/Sources/justMUSIC/lib/screens/loading_screen.dart
+++ b/Sources/justMUSIC/lib/screens/loading_screen.dart
@@ -1,4 +1,4 @@
-import 'package:flutter/Material.dart';
+import 'package:flutter/material.dart';
import '../values/constants.dart';
diff --git a/Sources/justMUSIC/lib/screens/post_screen.dart b/Sources/justMUSIC/lib/screens/post_screen.dart
index fb6dbed..a256406 100644
--- a/Sources/justMUSIC/lib/screens/post_screen.dart
+++ b/Sources/justMUSIC/lib/screens/post_screen.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';
diff --git a/Sources/justMUSIC/lib/screens/profile_screen.dart b/Sources/justMUSIC/lib/screens/profile_screen.dart
index e0f484c..a25176b 100644
--- a/Sources/justMUSIC/lib/screens/profile_screen.dart
+++ b/Sources/justMUSIC/lib/screens/profile_screen.dart
@@ -19,9 +19,9 @@ class ProfileScreen extends StatefulWidget {
class _ProfileScreenState extends State {
@override
Widget build(BuildContext context) {
- Future 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 {
Navigator.of(context).push(routeUser(MyApp.userViewModel.userCurrent));
}
- void _openPassword() {
+ void openConfirmationDelete() {
+ showCupertinoModalPopup(
+ 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(
+ 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 {
SettingPartComponent(
icon: JustMusicIcon.password,
label: 'Modifier mon mot de passe',
- action: _openPassword,
+ action: openPassword,
),
SettingPartComponent(
icon: JustMusicIcon.cross,
diff --git a/Sources/justMUSIC/lib/screens/search_location_screen.dart b/Sources/justMUSIC/lib/screens/search_location_screen.dart
index 82d8261..080dcc2 100644
--- a/Sources/justMUSIC/lib/screens/search_location_screen.dart
+++ b/Sources/justMUSIC/lib/screens/search_location_screen.dart
@@ -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';
diff --git a/Sources/justMUSIC/lib/screens/search_song_screen.dart b/Sources/justMUSIC/lib/screens/search_song_screen.dart
index a20355c..3813a43 100644
--- a/Sources/justMUSIC/lib/screens/search_song_screen.dart
+++ b/Sources/justMUSIC/lib/screens/search_song_screen.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';
diff --git a/Sources/justMUSIC/lib/screens/user_screen.dart b/Sources/justMUSIC/lib/screens/user_screen.dart
index 30eb974..9d5efb2 100644
--- a/Sources/justMUSIC/lib/screens/user_screen.dart
+++ b/Sources/justMUSIC/lib/screens/user_screen.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 {
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 {
SizedBox(
height: 40,
),
- RecapComponent(user: widget.user)
+ Container(
+ constraints: const BoxConstraints( maxWidth: 500),
+ child: RecapComponent(user: widget.user),
+ )
+
],
),
),
diff --git a/Sources/justMUSIC/lib/screens/verify_email_screen.dart b/Sources/justMUSIC/lib/screens/verify_email_screen.dart
index 63b0e16..23d2438 100644
--- a/Sources/justMUSIC/lib/screens/verify_email_screen.dart
+++ b/Sources/justMUSIC/lib/screens/verify_email_screen.dart
@@ -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';
diff --git a/Sources/justMUSIC/lib/services/CapsuleService.dart b/Sources/justMUSIC/lib/services/CapsuleService.dart
new file mode 100644
index 0000000..95ff4e8
--- /dev/null
+++ b/Sources/justMUSIC/lib/services/CapsuleService.dart
@@ -0,0 +1,33 @@
+import 'package:cloud_firestore/cloud_firestore.dart';
+
+class CapsuleService {
+ Future> recapSevenDays(String id) async {
+ List recapList = [];
+
+ DateTime sevenDaysAgo = DateTime.now().subtract(Duration(days: 6));
+
+ QuerySnapshot