diff --git a/.idea/libraries/Dart_Packages.xml b/.idea/libraries/Dart_Packages.xml
index d31b78d..72fa842 100644
--- a/.idea/libraries/Dart_Packages.xml
+++ b/.idea/libraries/Dart_Packages.xml
@@ -16,6 +16,13 @@
+
+
+
+
+
+
+
@@ -798,6 +805,7 @@
+
diff --git a/Sources/justMUSIC/assets/animations/rocket.json b/Sources/justMUSIC/assets/animations/rocket.json
index e960151..78a6912 100644
--- a/Sources/justMUSIC/assets/animations/rocket.json
+++ b/Sources/justMUSIC/assets/animations/rocket.json
@@ -1 +1 @@
-{"nm":"newScene","ddd":0,"h":506,"w":246,"meta":{"g":"LottieFiles Figma v38"},"layers":[{"ty":4,"nm":"","sr":1,"st":0,"op":55,"ip":0,"hd":false,"ddd":0,"bm":0,"hasMask":false,"ao":0,"ks":{"a":{"a":0,"k":[0,0]},"s":{"a":0,"k":[100,100]},"sk":{"a":0,"k":0},"p":{"a":0,"k":[0,0]},"r":{"a":0,"k":0},"sa":{"a":0,"k":0},"o":{"a":0,"k":100}},"ef":[],"shapes":[{"ty":"gr","bm":0,"hd":false,"nm":"","it":[{"ty":"sh","bm":0,"hd":false,"nm":"","d":1,"ks":{"a":0,"k":{"c":true,"i":[[0,0],[18.31699999999998,-14.117000000000019],[0,0],[4.924000000000007,-5.552999999999997],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[-2.176000000000016,8.12299999999999],[0,0],[-4.0330000000000155,15.050000000000011],[0,0],[0,0]],"o":[[-15.049000000000007,-4.031999999999982],[0,0],[-8.12299999999999,-2.1759999999999877],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[7.271000000000015,-1.488999999999976],[0,0],[21.383999999999986,-8.803999999999974],[0,0],[0,0],[0,0]],"v":[[229.562,323.522],[173.235,338.521],[161.993,335.509],[142.666,343.701],[136.075,351.133],[146.207,353.848],[156.351,356.566],[164.059,369.916],[171.766,383.266],[169.048,393.41],[166.333,403.542],[176.065,401.551],[192.823,388.908],[195.836,377.666],[236.989,336.385],[239.707,326.24],[229.562,323.522]]}}},{"ty":"sh","bm":0,"hd":false,"nm":"","d":1,"ks":{"a":0,"k":{"c":true,"i":[[0,0],[1.0389999999999873,-3.8759999999999764],[3.8770000000000095,1.038000000000011],[-1.0389999999999873,3.8770000000000095],[-3.8770000000000095,-1.0389999999999873]],"o":[[3.8760000000000048,1.038000000000011],[-1.0390000000000157,3.8770000000000095],[-3.8770000000000095,-1.0389999999999873],[1.038000000000011,-3.8770000000000095],[0,0]],"v":[[205.989,339.775],[211.127,348.674],[202.227,353.813],[197.089,344.913],[205.989,339.775]]}}},{"ty":"sh","bm":0,"hd":false,"nm":"","d":1,"ks":{"a":0,"k":{"c":true,"i":[[0,0],[0,0],[0,0],[-7.138000000000005,4.120999999999981],[0,0],[0,0]],"o":[[0,0],[-6.4269999999999925,3.7110000000000127],[0,0],[0,0],[0,0],[0,0]],"v":[[149.08,369.664],[144.63,372.233],[132.909,387.9],[152.338,385.583],[156.788,383.014],[149.08,369.664]]}}},{"ty":"fl","bm":0,"hd":false,"nm":"","c":{"a":0,"k":[1,1,1]},"r":1,"o":{"a":0,"k":100}},{"ty":"tr","a":{"a":0,"k":[0,0]},"s":{"a":0,"k":[100,100]},"sk":{"a":0,"k":0},"p":{"a":0,"k":[0,0]},"r":{"a":1,"k":[{"o":{"x":0.167,"y":0.167},"i":{"x":0.833,"y":0.833},"s":[90],"t":0},{"o":{"x":0.167,"y":0.167},"i":{"x":0.833,"y":0.833},"s":[90],"t":5},{"s":[0],"t":25}]},"sa":{"a":0,"k":0},"o":{"a":1,"k":[{"o":{"x":0.167,"y":0.167},"i":{"x":0.833,"y":0.833},"s":[0],"t":0},{"o":{"x":0.167,"y":0.167},"i":{"x":0.833,"y":0.833},"s":[0],"t":5},{"s":[100],"t":25}]}}]}],"ind":1}],"v":"5.7.0","fr":60,"op":55,"ip":0,"assets":[]}
\ No newline at end of file
+{"nm":"newScene","ddd":0,"h":506,"w":246,"meta":{"g":"LottieFiles Figma v38"},"layers":[{"ty":4,"nm":"","sr":1,"st":0,"op":55,"ip":0,"hd":false,"ddd":0,"bm":0,"hasMask":false,"ao":0,"ks":{"a":{"a":0,"k":[0,0]},"s":{"a":0,"k":[100,100]},"sk":{"a":0,"k":0},"p":{"a":0,"k":[0,0]},"r":{"a":0,"k":0},"sa":{"a":0,"k":0},"o":{"a":0,"k":100}},"ef":[],"shapes":[{"ty":"gr","bm":0,"hd":false,"nm":"","it":[{"ty":"sh","bm":0,"hd":false,"nm":"","d":1,"ks":{"a":0,"k":{"c":true,"i":[[0,0],[18.31699999999998,-14.117000000000019],[0,0],[4.924000000000007,-5.552999999999997],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[-2.176000000000016,8.12299999999999],[0,0],[-4.0330000000000155,15.050000000000011],[0,0],[0,0]],"o":[[-15.049000000000007,-4.031999999999982],[0,0],[-8.12299999999999,-2.1759999999999877],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[7.271000000000015,-1.488999999999976],[0,0],[21.383999999999986,-8.803999999999974],[0,0],[0,0],[0,0]],"v":[[229.562,323.522],[173.235,338.521],[161.993,335.509],[142.666,343.701],[136.075,351.133],[146.207,353.848],[156.351,356.566],[164.059,369.916],[171.766,383.266],[169.048,393.41],[166.333,403.542],[176.065,401.551],[192.823,388.908],[195.836,377.666],[236.989,336.385],[239.707,326.24],[229.562,323.522]]}}},{"ty":"sh","bm":0,"hd":false,"nm":"","d":1,"ks":{"a":0,"k":{"c":true,"i":[[0,0],[1.0389999999999873,-3.8759999999999764],[3.8770000000000095,1.038000000000011],[-1.0389999999999873,3.8770000000000095],[-3.8770000000000095,-1.0389999999999873]],"o":[[3.8760000000000048,1.038000000000011],[-1.0390000000000157,3.8770000000000095],[-3.8770000000000095,-1.0389999999999873],[1.038000000000011,-3.8770000000000095],[0,0]],"v":[[205.989,339.775],[211.127,348.674],[202.227,353.813],[197.089,344.913],[205.989,339.775]]}}},{"ty":"sh","bm":0,"hd":false,"nm":"","d":1,"ks":{"a":0,"k":{"c":true,"i":[[0,0],[0,0],[0,0],[-7.138000000000005,4.120999999999981],[0,0],[0,0]],"o":[[0,0],[-6.4269999999999925,3.7110000000000127],[0,0],[0,0],[0,0],[0,0]],"v":[[149.08,369.664],[144.63,372.233],[132.909,387.9],[152.338,385.583],[156.788,383.014],[149.08,369.664]]}}},{"ty":"fl","bm":0,"hd":false,"nm":"","c":{"a":0,"k":[0.0471,0.0471,0.0471]},"r":1,"o":{"a":0,"k":100}},{"ty":"tr","a":{"a":0,"k":[0,0]},"s":{"a":0,"k":[100,100]},"sk":{"a":0,"k":0},"p":{"a":0,"k":[0,0]},"r":{"a":1,"k":[{"o":{"x":0.167,"y":0.167},"i":{"x":0.833,"y":0.833},"s":[90],"t":0},{"o":{"x":0.167,"y":0.167},"i":{"x":0.833,"y":0.833},"s":[90],"t":5},{"s":[0],"t":25}]},"sa":{"a":0,"k":0},"o":{"a":1,"k":[{"o":{"x":0.167,"y":0.167},"i":{"x":0.833,"y":0.833},"s":[0],"t":0},{"o":{"x":0.167,"y":0.167},"i":{"x":0.833,"y":0.833},"s":[0],"t":5},{"s":[100],"t":25}]}}]}],"ind":1}],"v":"5.7.0","fr":60,"op":55,"ip":0,"assets":[]}
\ No newline at end of file
diff --git a/Sources/justMUSIC/lib/components/editable_post_component.dart b/Sources/justMUSIC/lib/components/editable_post_component.dart
index d45a26d..fa60606 100644
--- a/Sources/justMUSIC/lib/components/editable_post_component.dart
+++ b/Sources/justMUSIC/lib/components/editable_post_component.dart
@@ -63,10 +63,7 @@ class _EditablePostComponentState extends State with Tick
Future pickImage(ImageSource source) async {
try {
- final image = await ImagePicker().pickImage(
- source: source,
- imageQuality: 20
- );
+ final image = await ImagePicker().pickImage(source: source, imageQuality: 20);
if (image == null) return;
final imageTemp = File(image.path);
setState(() {
@@ -130,69 +127,66 @@ class _EditablePostComponentState extends State with Tick
color: warningBttnColor,
child: Column(
children: [
- CircularRevealAnimation(
- animation: animation,
- centerOffset: Offset(30.w, -100),
- child: Stack(
- children: [
- AspectRatio(
- aspectRatio: 1 / 1,
- child: Container(
- decoration: BoxDecoration(
- // add border
- border: Border.all(width: 3.0, color: grayColor),
- // set border radius
- borderRadius: BorderRadius.circular(20),
- ),
- child: ClipRRect(
- borderRadius: BorderRadius.circular(18),
- // implement image
- child: widget.music == null
- ? Container(
- color: grayColor,
- width: double.infinity,
- )
- : Image(
- image: NetworkImage(widget.music?.cover ?? ""),
+ Stack(
+ children: [
+ AspectRatio(
+ aspectRatio: 1 / 1,
+ child: Container(
+ decoration: BoxDecoration(
+ // add border
+ border: Border.all(width: 3.0, color: grayColor),
+ // set border radius
+ borderRadius: BorderRadius.circular(20),
+ ),
+ child: ClipRRect(
+ borderRadius: BorderRadius.circular(18),
+ // implement image
+ child: widget.music == null
+ ? Container(
+ color: grayColor,
+ width: double.infinity,
+ )
+ : Image(
+ image: NetworkImage(widget.music?.cover ?? ""),
+ fit: BoxFit.cover,
+ width: double.infinity,
+ ),
+ ),
+ ),
+ ),
+ image != null
+ ? Positioned(
+ top: 10,
+ right: 10,
+ child: AnimatedAppear(
+ delay: Duration(milliseconds: 500),
+ duration: Duration(milliseconds: 400),
+ child: Container(
+ width: 110,
+ height: 110,
+ decoration: BoxDecoration(
+ image: DecorationImage(
+ image: FileImage(image!),
fit: BoxFit.cover,
- width: double.infinity,
),
- ),
- ),
- ),
- image != null
- ? Positioned(
- top: 10,
- right: 10,
- child: AnimatedAppear(
- delay: Duration(milliseconds: 500),
- duration: Duration(milliseconds: 400),
- child: Container(
- width: 110,
- height: 110,
- decoration: BoxDecoration(
- image: DecorationImage(
- image: FileImage(image!),
- fit: BoxFit.cover,
- ),
- color: grayColor,
- borderRadius: BorderRadius.circular(20),
- border: Border.all(style: BorderStyle.solid, color: Colors.white, width: 4)),
- child: ClipRRect(
- borderRadius: BorderRadius.circular(20),
- child: InstaImageViewer(
- backgroundIsTransparent: true,
- child: Image(
- image: FileImage(image!),
- fit: BoxFit.cover,
- ),
- ),
+ color: grayColor,
+ borderRadius: BorderRadius.circular(20),
+ border: Border.all(style: BorderStyle.solid, color: Colors.white, width: 4)),
+ child: ClipRRect(
+ borderRadius: BorderRadius.circular(20),
+ child: InstaImageViewer(
+ backgroundIsTransparent: true,
+ child: Image(
+ image: FileImage(image!),
+ fit: BoxFit.cover,
),
),
- ))
- : Container()
- ],
- )),
+ ),
+ ),
+ ))
+ : Container()
+ ],
+ ),
widget.music != null
? Padding(
padding: const EdgeInsets.all(10),
diff --git a/Sources/justMUSIC/lib/components/top_nav_bar_component.dart b/Sources/justMUSIC/lib/components/top_nav_bar_component.dart
index ab0c499..422f23f 100644
--- a/Sources/justMUSIC/lib/components/top_nav_bar_component.dart
+++ b/Sources/justMUSIC/lib/components/top_nav_bar_component.dart
@@ -109,7 +109,8 @@ class _TopNavBarComponentState extends State with TickerProv
}
void checkAvailable() async {
- print("test");
+ showCapsuleDot(true);
+ /*print("test");
var res = await MyApp.postViewModel.getAvailable();
print(res);
ModalRoute? route = ModalRoute.of(context);
@@ -118,7 +119,7 @@ class _TopNavBarComponentState extends State with TickerProv
print("yes");
showCapsuleDot(res);
}
- }
+ }*/
}
@override
diff --git a/Sources/justMUSIC/lib/config/routes.dart b/Sources/justMUSIC/lib/config/routes.dart
index 09d4265..5c6c7a6 100644
--- a/Sources/justMUSIC/lib/config/routes.dart
+++ b/Sources/justMUSIC/lib/config/routes.dart
@@ -1,5 +1,6 @@
import 'package:flutter/Material.dart';
import 'package:justmusic/screens/add_friend_screen.dart';
+import 'package:justmusic/screens/feed_screen.dart';
import 'package:justmusic/screens/profile_screen.dart';
Route routeProfile() {
@@ -37,3 +38,15 @@ Route routeAddFriend() {
},
);
}
+
+Route routeRocket() {
+ return PageRouteBuilder(
+ pageBuilder: (context, animation, secondaryAnimation) => FeedScreen(),
+ transitionsBuilder: (context, animation, secondaryAnimation, child) {
+ return FadeTransition(
+ opacity: animation,
+ child: child,
+ );
+ },
+ );
+}
diff --git a/Sources/justMUSIC/lib/screens/launching_rocker_screen.dart b/Sources/justMUSIC/lib/screens/launching_rocker_screen.dart
index b815342..2195c80 100644
--- a/Sources/justMUSIC/lib/screens/launching_rocker_screen.dart
+++ b/Sources/justMUSIC/lib/screens/launching_rocker_screen.dart
@@ -1,4 +1,5 @@
import 'package:flutter/Material.dart';
+import 'package:justmusic/config/routes.dart';
import 'package:lottie/lottie.dart';
import '../values/constants.dart';
@@ -18,24 +19,24 @@ class _LaunchingRocketScreenState extends State with Tick
@override
initState() {
- _controller = AnimationController(vsync: this, duration: Duration(seconds: 3));
+ _controller = AnimationController(vsync: this, duration: Duration(seconds: 7));
_controller2 = AnimationController(
vsync: this,
- duration: Duration(milliseconds: 800),
+ duration: Duration(milliseconds: 900),
);
final CurvedAnimation curve = CurvedAnimation(parent: _controller2, curve: Curves.easeIn);
_animation = Tween(
begin: 0,
- end: 1,
+ end: 0.6,
).animate(curve);
_controller2.addStatusListener((status) {
print("cccccccc");
if (status == AnimationStatus.completed) {
- Navigator.of(context).popUntil((route) => route.settings.name == '/feed');
+ Navigator.of(context).push(routeRocket());
}
});
@@ -100,7 +101,7 @@ class CirclePainter extends CustomPainter {
@override
void paint(Canvas canvas, Size size) {
- Paint paint = Paint()..color = Colors.white;
+ Paint paint = Paint()..color = bgColor;
double radius = 50 * circlePosition; // Remplacez par le rayon souhaité de votre cercle
Offset center = Offset(size.width / 2, size.height / 2);
diff --git a/Sources/justMUSIC/lib/screens/post_screen.dart b/Sources/justMUSIC/lib/screens/post_screen.dart
index 3f76761..c7ffce9 100644
--- a/Sources/justMUSIC/lib/screens/post_screen.dart
+++ b/Sources/justMUSIC/lib/screens/post_screen.dart
@@ -1,8 +1,10 @@
import 'dart:io';
import 'dart:ui';
+import 'package:animations/animations.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';
import 'package:justmusic/screens/search_song_screen.dart';
import 'package:tuple/tuple.dart';
import '../components/editable_post_component.dart';
@@ -96,6 +98,7 @@ class _PostScreenState extends State with SingleTickerProviderStateM
}
quit() {
+ Navigator.of(context).pop();
Navigator.pushNamed(context, '/launchingRocket');
}
@@ -146,9 +149,21 @@ class _PostScreenState extends State with SingleTickerProviderStateM
SizedBox(
height: 40.h,
),
- PostButtonComponent(
- empty: selectedMusic == null,
- callback: handleSubmit,
+ OpenContainer(
+ openBuilder: (context, closedContainer) {
+ return const LaunchingRocketScreen();
+ },
+ openColor: Colors.transparent,
+ closedShape: RoundedRectangleBorder(borderRadius: BorderRadius.all(Radius.circular(100.0))),
+ closedColor: Colors.transparent,
+ closedElevation: 6,
+ transitionDuration: const Duration(milliseconds: 2000),
+ closedBuilder: (context, openContainer) {
+ return PostButtonComponent(
+ empty: selectedMusic == null,
+ callback: handleSubmit,
+ );
+ },
),
SizedBox(
height: 40.h,
diff --git a/Sources/justMUSIC/pubspec.lock b/Sources/justMUSIC/pubspec.lock
index 6de85fb..b0be0a1 100644
--- a/Sources/justMUSIC/pubspec.lock
+++ b/Sources/justMUSIC/pubspec.lock
@@ -17,6 +17,14 @@ packages:
url: "https://pub.dev"
source: hosted
version: "0.0.4"
+ animations:
+ dependency: "direct main"
+ description:
+ name: animations
+ sha256: fe8a6bdca435f718bb1dc8a11661b2c22504c6da40ef934cee8327ed77934164
+ url: "https://pub.dev"
+ source: hosted
+ version: "2.0.7"
another_flushbar:
dependency: "direct main"
description:
diff --git a/Sources/justMUSIC/pubspec.yaml b/Sources/justMUSIC/pubspec.yaml
index ab36a1a..f3ad4f0 100644
--- a/Sources/justMUSIC/pubspec.yaml
+++ b/Sources/justMUSIC/pubspec.yaml
@@ -69,6 +69,7 @@ dependencies:
intl: ^0.18.1
lottie: ^2.5.0
custom_refresh_indicator: ^2.2.1
+ animations: ^2.0.7
dev_dependencies:
flutter_test: