diff --git a/.idea/Project_JustMusic.iml b/.idea/Project_JustMusic.iml index ea13052..80e8d93 100644 --- a/.idea/Project_JustMusic.iml +++ b/.idea/Project_JustMusic.iml @@ -9,6 +9,9 @@ + + + diff --git a/.idea/libraries/Dart_Packages.xml b/.idea/libraries/Dart_Packages.xml index 3b44ee2..2e78728 100644 --- a/.idea/libraries/Dart_Packages.xml +++ b/.idea/libraries/Dart_Packages.xml @@ -9,6 +9,55 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -86,6 +135,13 @@ + + + + + + @@ -93,6 +149,13 @@ + + + + + + @@ -121,6 +184,13 @@ + + + + + + @@ -163,6 +233,20 @@ + + + + + + + + + + + + @@ -303,6 +387,13 @@ + + + + + + @@ -331,6 +422,13 @@ + + + + + + @@ -363,6 +461,13 @@ + + + + + + + @@ -374,6 +479,8 @@ + + @@ -383,6 +490,8 @@ + + @@ -402,10 +511,12 @@ + + @@ -413,6 +524,7 @@ + diff --git a/.idea/libraries/Dart_SDK.xml b/.idea/libraries/Dart_SDK.xml index 8173c5d..df2867e 100644 --- a/.idea/libraries/Dart_SDK.xml +++ b/.idea/libraries/Dart_SDK.xml @@ -1,25 +1,26 @@ - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + diff --git a/README.md b/README.md index 4babb63..9546276 100644 --- a/README.md +++ b/README.md @@ -9,7 +9,7 @@ --- -[Présentation](#présentation) | [Répartion](#répartition-du-gitlab) | [Fonctionnement](#fonctionnement) | [Deploiement](#deploiement) | [Remerciements](#remerciements) | [Wiki](https://codefirst.iut.uca.fr/git/justDEV/justMusic/wiki) +[Présentation](#présentation) | [Répartion](#répartition-du-gitlab) | [Fonctionnement](#fonctionnement) | [Deploiement](#deploiement) | [Remerciements](#remerciements) | [Wiki](https://codefirst.iut.uca.fr/git/justDEV/justMusic/wiki) | [Site officiel](https://justmusicapp.com) diff --git a/Sources/justMUSIC/.metadata b/Sources/justMUSIC/.metadata index 700134a..e1179a6 100644 --- a/Sources/justMUSIC/.metadata +++ b/Sources/justMUSIC/.metadata @@ -21,6 +21,18 @@ migration: - platform: ios create_revision: 18a827f3933c19f51862dde3fa472197683249d6 base_revision: 18a827f3933c19f51862dde3fa472197683249d6 + - platform: linux + create_revision: 18a827f3933c19f51862dde3fa472197683249d6 + base_revision: 18a827f3933c19f51862dde3fa472197683249d6 + - platform: macos + create_revision: 18a827f3933c19f51862dde3fa472197683249d6 + base_revision: 18a827f3933c19f51862dde3fa472197683249d6 + - platform: web + create_revision: 18a827f3933c19f51862dde3fa472197683249d6 + base_revision: 18a827f3933c19f51862dde3fa472197683249d6 + - platform: windows + create_revision: 18a827f3933c19f51862dde3fa472197683249d6 + base_revision: 18a827f3933c19f51862dde3fa472197683249d6 # User provided section diff --git a/Sources/justMUSIC/android/app/build.gradle b/Sources/justMUSIC/android/app/build.gradle index 50538fd..2c71df3 100644 --- a/Sources/justMUSIC/android/app/build.gradle +++ b/Sources/justMUSIC/android/app/build.gradle @@ -26,7 +26,7 @@ apply plugin: 'kotlin-android' apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle" android { - compileSdkVersion flutter.compileSdkVersion + compileSdkVersion 33 ndkVersion flutter.ndkVersion compileOptions { diff --git a/Sources/justMUSIC/assets/images/background_justMusic.png b/Sources/justMUSIC/assets/images/background_justMusic.png new file mode 100644 index 0000000..adf76c5 Binary files /dev/null and b/Sources/justMUSIC/assets/images/background_justMusic.png differ diff --git a/Sources/justMUSIC/assets/images/camera_icon.png b/Sources/justMUSIC/assets/images/camera_icon.png new file mode 100644 index 0000000..ac405eb Binary files /dev/null and b/Sources/justMUSIC/assets/images/camera_icon.png differ diff --git a/Sources/justMUSIC/assets/images/cross_icon.png b/Sources/justMUSIC/assets/images/cross_icon.png new file mode 100644 index 0000000..047be1f Binary files /dev/null and b/Sources/justMUSIC/assets/images/cross_icon.png differ diff --git a/Sources/justMUSIC/assets/images/explicit_icon.png b/Sources/justMUSIC/assets/images/explicit_icon.png new file mode 100644 index 0000000..0cb0a5b Binary files /dev/null and b/Sources/justMUSIC/assets/images/explicit_icon.png differ diff --git a/Sources/justMUSIC/assets/images/history_icon.png b/Sources/justMUSIC/assets/images/history_icon.png new file mode 100644 index 0000000..e6edc05 Binary files /dev/null and b/Sources/justMUSIC/assets/images/history_icon.png differ diff --git a/Sources/justMUSIC/assets/images/loadingPlaceholder.gif b/Sources/justMUSIC/assets/images/loadingPlaceholder.gif new file mode 100644 index 0000000..490bf64 Binary files /dev/null and b/Sources/justMUSIC/assets/images/loadingPlaceholder.gif differ diff --git a/Sources/justMUSIC/assets/images/notification_icon.png b/Sources/justMUSIC/assets/images/notification_icon.png new file mode 100644 index 0000000..148459d Binary files /dev/null and b/Sources/justMUSIC/assets/images/notification_icon.png differ diff --git a/Sources/justMUSIC/assets/images/profile_icon.png b/Sources/justMUSIC/assets/images/profile_icon.png new file mode 100644 index 0000000..bc9701b Binary files /dev/null and b/Sources/justMUSIC/assets/images/profile_icon.png differ diff --git a/Sources/justMUSIC/assets/images/return_icon.png b/Sources/justMUSIC/assets/images/return_icon.png new file mode 100644 index 0000000..b217978 Binary files /dev/null and b/Sources/justMUSIC/assets/images/return_icon.png differ diff --git a/Sources/justMUSIC/assets/images/search_icon.png b/Sources/justMUSIC/assets/images/search_icon.png new file mode 100644 index 0000000..eb44ee1 Binary files /dev/null and b/Sources/justMUSIC/assets/images/search_icon.png differ diff --git a/Sources/justMUSIC/assets/images/spotify_icon.png b/Sources/justMUSIC/assets/images/spotify_icon.png new file mode 100644 index 0000000..4fc3427 Binary files /dev/null and b/Sources/justMUSIC/assets/images/spotify_icon.png differ diff --git a/Sources/justMUSIC/assets/images/theme_icon.png b/Sources/justMUSIC/assets/images/theme_icon.png new file mode 100644 index 0000000..b849765 Binary files /dev/null and b/Sources/justMUSIC/assets/images/theme_icon.png differ diff --git a/Sources/justMUSIC/assets/images/trash_icon.png b/Sources/justMUSIC/assets/images/trash_icon.png new file mode 100644 index 0000000..f7f8df5 Binary files /dev/null and b/Sources/justMUSIC/assets/images/trash_icon.png differ diff --git a/Sources/justMUSIC/assets/images/unknown.png b/Sources/justMUSIC/assets/images/unknown.png new file mode 100644 index 0000000..f26069a Binary files /dev/null and b/Sources/justMUSIC/assets/images/unknown.png differ diff --git a/Sources/justMUSIC/lib/components/Finish_button.dart b/Sources/justMUSIC/lib/components/Finish_button.dart index e6dc6e6..bb438f4 100644 --- a/Sources/justMUSIC/lib/components/Finish_button.dart +++ b/Sources/justMUSIC/lib/components/Finish_button.dart @@ -13,7 +13,9 @@ class _FinishButtonState extends State { @override Widget build(BuildContext context) { return ElevatedButton( - onPressed: () {}, + onPressed: () { + Navigator.pushNamed(context, '/feed'); + }, style: ButtonStyle( backgroundColor: MaterialStateProperty.all(Color(0xFF1C1C1C)), overlayColor: diff --git a/Sources/justMUSIC/lib/components/back_button.dart b/Sources/justMUSIC/lib/components/back_button.dart new file mode 100644 index 0000000..5e771fa --- /dev/null +++ b/Sources/justMUSIC/lib/components/back_button.dart @@ -0,0 +1,34 @@ +import 'package:flutter/Material.dart'; + +import '../values/constants.dart'; + +class BackButtonComponent extends StatefulWidget { + const BackButtonComponent({Key? key}) : super(key: key); + + @override + State createState() => _BackButtonComponentState(); +} + +class _BackButtonComponentState extends State { + @override + Widget build(BuildContext context) { + return GestureDetector( + onTap: () { + Navigator.pop(context); + }, + child: ClipOval( + child: Container( + height: 40, + width: 40, + color: Colors.white, + child: Center( + child: Icon( + Icons.arrow_back_outlined, + color: bgColor, + ), + ), + ), + ), + ); + } +} diff --git a/Sources/justMUSIC/lib/components/comment_component.dart b/Sources/justMUSIC/lib/components/comment_component.dart index 924d44b..641f2f1 100644 --- a/Sources/justMUSIC/lib/components/comment_component.dart +++ b/Sources/justMUSIC/lib/components/comment_component.dart @@ -49,6 +49,9 @@ class CommentComponent extends StatelessWidget { ), ], ), + SizedBox( + height: 10, + ), Text( "J’adore ce son auss je trouve qu’il a vraiment une plume de fou le rap c’est trop bien jknei rhozi ugzeor gzhjkev huz vhzbejlh zouebvfiyzv fi hzejkfb zjf ouzebfjzebihf b zuib fiuzebfihzbejfbzejkbf hzbfiébiu zegiu fzieu iuzy giuzeg iuzg eiu zg ", style: GoogleFonts.plusJakartaSans( diff --git a/Sources/justMUSIC/lib/components/editable_post_component.dart b/Sources/justMUSIC/lib/components/editable_post_component.dart new file mode 100644 index 0000000..b25b1c8 --- /dev/null +++ b/Sources/justMUSIC/lib/components/editable_post_component.dart @@ -0,0 +1,113 @@ +import 'package:auto_size_text/auto_size_text.dart'; +import 'package:flutter/Material.dart'; +import 'package:flutter_screenutil/flutter_screenutil.dart'; +import 'package:google_fonts/google_fonts.dart'; +import 'package:justmusic/values/constants.dart'; + +class EditablePostComponent extends StatefulWidget { + const EditablePostComponent({Key? key}) : super(key: key); + + @override + State createState() => _EditablePostComponentState(); +} + +class _EditablePostComponentState extends State { + @override + Widget build(BuildContext context) { + return ClipRRect( + borderRadius: BorderRadius.circular(25), + child: Container( + constraints: BoxConstraints(maxWidth: 400), + width: double.infinity, + color: warningBttnColor, + child: Column( + 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: const Image( + image: AssetImage("assets/images/exemple_cover.png"), + fit: BoxFit.cover, + width: double.infinity, + ), + ), + ), + ), + Padding( + padding: EdgeInsets.fromLTRB(15, 25, 15, 25), + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + AutoSizeText( + "France, Lyon", + style: GoogleFonts.plusJakartaSans( + color: Colors.white, fontSize: 13.sp), + maxFontSize: 20, + ), + Image( + image: AssetImage("assets/images/camera_icon.png"), + width: 30, + ), + AutoSizeText( + "10 Juil. 2023", + style: GoogleFonts.plusJakartaSans( + color: Colors.white, fontSize: 13.sp), + maxFontSize: 20, + ), + ], + ), + ), + Padding( + padding: EdgeInsets.fromLTRB(15, 0, 10, 25), + child: SizedBox( + width: double.infinity, + child: TextFormField( + keyboardAppearance: Brightness.dark, + minLines: 1, + cursorColor: primaryColor, + style: GoogleFonts.plusJakartaSans( + color: Colors.white, + fontSize: 13, + fontWeight: FontWeight.w300), + maxLines: 4, + maxLength: 120, + decoration: InputDecoration( + counterStyle: GoogleFonts.plusJakartaSans( + color: grayText, fontSize: 9), + focusedBorder: const OutlineInputBorder( + borderSide: + BorderSide(width: 0, color: Colors.transparent), + borderRadius: + BorderRadius.all(Radius.circular(10))), + contentPadding: + const EdgeInsets.only(top: 0, bottom: 0, left: 0), + fillColor: Colors.transparent, + filled: true, + focusColor: Colors.transparent, + enabledBorder: const OutlineInputBorder( + borderSide: + BorderSide(width: 0, color: Colors.transparent), + borderRadius: + BorderRadius.all(Radius.circular(10))), + hintText: 'Description...', + hintStyle: GoogleFonts.plusJakartaSans( + color: grayText, + fontSize: 13, + fontWeight: FontWeight.w300), + ), + ), + )), + ], + ), + )); + } +} diff --git a/Sources/justMUSIC/lib/components/join_button.dart b/Sources/justMUSIC/lib/components/join_button.dart index 1c141e6..4b64e7e 100644 --- a/Sources/justMUSIC/lib/components/join_button.dart +++ b/Sources/justMUSIC/lib/components/join_button.dart @@ -8,7 +8,9 @@ class JoinButton extends StatelessWidget { @override Widget build(BuildContext context) { return ElevatedButton( - onPressed: () {}, + onPressed: () { + Navigator.pushNamed(context, '/register'); + }, child: Text( "Rejoindre", style: GoogleFonts.plusJakartaSans( diff --git a/Sources/justMUSIC/lib/components/login_button.dart b/Sources/justMUSIC/lib/components/login_button.dart index badf09f..3e41e8e 100644 --- a/Sources/justMUSIC/lib/components/login_button.dart +++ b/Sources/justMUSIC/lib/components/login_button.dart @@ -13,7 +13,9 @@ class _LoginButtonState extends State { @override Widget build(BuildContext context) { return ElevatedButton( - onPressed: () {}, + onPressed: () { + Navigator.pushNamed(context, '/explanation'); + }, style: ButtonStyle( backgroundColor: MaterialStateProperty.all(Color(0xFF1C1C1C)), overlayColor: diff --git a/Sources/justMUSIC/lib/components/music_list_component.dart b/Sources/justMUSIC/lib/components/music_list_component.dart new file mode 100644 index 0000000..c92bba1 --- /dev/null +++ b/Sources/justMUSIC/lib/components/music_list_component.dart @@ -0,0 +1,100 @@ +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'; +import '../model/Music.dart'; + +class MusicListComponent extends StatelessWidget { + final Music music; + const MusicListComponent({ + Key? key, + required this.music, + }) : super(key: key); + + @override + Widget build(BuildContext context) { + return Container( + padding: const EdgeInsets.only(bottom: 14), + child: Row( + children: [ + LayoutBuilder( + builder: (BuildContext context, BoxConstraints constraints) { + if (music.cover != null) { + return ClipRRect( + borderRadius: BorderRadius.all(Radius.circular(5)), + child: music.cover != null + ? FadeInImage.assetNetwork( + height: 60, + width: 60, + fit: BoxFit.cover, + placeholder: "assets/images/loadingPlaceholder.gif", + image: music.cover!) + : Container( + height: 60, + width: 60, + color: Colors.grey, + ), + ); + } else { + return Image( + image: AssetImage("assets/images/exemple_cover.png"), + height: 60, + width: 60, + ); + } + }), + const SizedBox( + width: 10, + ), + Expanded( + flex: 10, + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + mainAxisAlignment: MainAxisAlignment.center, + children: [ + Row( + children: [ + Flexible( + flex: 8, + child: ScrollConfiguration( + behavior: + ScrollBehavior().copyWith(scrollbars: false), + child: TextScroll( + music.title ?? "Unknown", + style: GoogleFonts.plusJakartaSans( + fontSize: 16, + color: Colors.white, + fontWeight: FontWeight.w700), + mode: TextScrollMode.endless, + pauseBetween: Duration(milliseconds: 2500), + velocity: Velocity(pixelsPerSecond: Offset(30, 0)), + intervalSpaces: 10, + ), + )), + Icon( + Icons.explicit, + color: Colors.grey.withOpacity(0.7), + size: 17, + ), + ], + ), + ScrollConfiguration( + behavior: ScrollBehavior().copyWith(scrollbars: false), + child: Text( + music.artists.first.name ?? "Unknown", + overflow: TextOverflow.ellipsis, + style: GoogleFonts.plusJakartaSans( + color: Colors.grey, fontWeight: FontWeight.w400), + )) + ], + ), + ), + Spacer(), + PlayButtonComponent( + urlPreview: music.previewUrl, + ) + ], + ), + ); + } +} diff --git a/Sources/justMUSIC/lib/components/play_button_component.dart b/Sources/justMUSIC/lib/components/play_button_component.dart new file mode 100644 index 0000000..5c3c2e2 --- /dev/null +++ b/Sources/justMUSIC/lib/components/play_button_component.dart @@ -0,0 +1,72 @@ +import 'package:audioplayers/audioplayers.dart'; +import 'package:flutter/Material.dart'; +import 'package:flutter_animated_play_button/flutter_animated_play_button.dart'; +import 'package:ionicons/ionicons.dart'; + +class PlayButtonComponent extends StatefulWidget { + final String? urlPreview; + const PlayButtonComponent({Key? key, required this.urlPreview}) + : super(key: key); + + @override + State createState() => _PlayButtonComponentState(); +} + +class _PlayButtonComponentState extends State { + bool isPlaying = true; + final player = AudioPlayer(); + void switchStatePlaying() { + setState(() { + isPlaying = !isPlaying; + }); + stopSong(); + } + + @override + void initState() { + player.onPlayerComplete.listen((event) { + switchStatePlaying(); + }); + super.initState(); + } + + @override + Widget build(BuildContext context) { + if (!isPlaying) { + playSong(); + } else {} + return isPlaying + ? GestureDetector( + onTap: switchStatePlaying, + child: Container( + width: 30, + height: 30, + child: Icon( + Ionicons.play_circle_outline, + color: Colors.grey.withOpacity(0.3), + size: 30, + )), + ) + : GestureDetector( + onTap: switchStatePlaying, + child: Container( + width: 30, + height: 30, + child: AnimatedPlayButton( + stopped: false, + color: Colors.grey.withOpacity(0.3), + onPressed: () {}, + ), + )); + } + + Future playSong() async { + if (widget.urlPreview != null) { + await player.play(UrlSource(widget.urlPreview ?? "")); + } + } + + Future stopSong() async { + await player.stop(); + } +} diff --git a/Sources/justMUSIC/lib/components/post_button_component.dart b/Sources/justMUSIC/lib/components/post_button_component.dart new file mode 100644 index 0000000..eff93b2 --- /dev/null +++ b/Sources/justMUSIC/lib/components/post_button_component.dart @@ -0,0 +1,33 @@ +import 'package:flutter/Material.dart'; +import 'package:google_fonts/google_fonts.dart'; +import 'package:flutter_screenutil/flutter_screenutil.dart'; + +class PostButtonComponent extends StatelessWidget { + const PostButtonComponent({Key? key}) : super(key: key); + + @override + Widget build(BuildContext context) { + return Container( + constraints: BoxConstraints(maxWidth: 400), + decoration: BoxDecoration( + gradient: LinearGradient(colors: [ + Color(0xFF141414), + Color(0xFF272727), + Color(0xFF141414) + ]), + borderRadius: BorderRadius.circular(10000)), + padding: EdgeInsets.symmetric(vertical: 25), + width: double.infinity, + child: Align( + child: Text( + "Publier la capsule", + style: GoogleFonts.plusJakartaSans( + color: Color(0xFF474747), + fontWeight: FontWeight.w800, + fontStyle: FontStyle.italic, + fontSize: 24), + ), + ), + ); + } +} diff --git a/Sources/justMUSIC/lib/components/post_component.dart b/Sources/justMUSIC/lib/components/post_component.dart index 5ca6a8f..7d47b8d 100644 --- a/Sources/justMUSIC/lib/components/post_component.dart +++ b/Sources/justMUSIC/lib/components/post_component.dart @@ -7,207 +7,423 @@ import 'package:gradient_borders/box_borders/gradient_box_border.dart'; import 'package:text_scroll/text_scroll.dart'; import 'package:zoom_tap_animation/zoom_tap_animation.dart'; -class PostComponent extends StatelessWidget { +class PostComponent extends StatefulWidget { final VoidCallback? callback; - const PostComponent({Key? key, required this.callback}) : super(key: key); + PostComponent({Key? key, required this.callback}) : super(key: key); + + @override + State createState() => _PostComponentState(); +} + +class _PostComponentState extends State { + bool choice = false; + + void switchChoice() { + setState(() { + choice = !choice; + }); + } + @override Widget build(BuildContext context) { - return SizedBox( - width: double.infinity, - child: Column( - children: [ - Row( - crossAxisAlignment: CrossAxisAlignment.end, - children: [ - ClipOval( - child: SizedBox.fromSize( - // Image radius - child: const Image( - image: AssetImage("assets/images/exemple_profile.png"), - width: 40, - ), - ), - ), - Expanded( - flex: 8, - child: Padding( - padding: const EdgeInsets.only(left: 10), - child: Column( - crossAxisAlignment: CrossAxisAlignment.start, + return GestureDetector( + onTap: switchChoice, + child: LayoutBuilder( + builder: (BuildContext context, BoxConstraints constraints) { + if (choice && widget.callback == null) { + return SizedBox( + width: double.infinity, + child: Column( + children: [ + Row( + crossAxisAlignment: CrossAxisAlignment.end, children: [ - Text( - "Melina", - style: GoogleFonts.plusJakartaSans( - color: Colors.white, fontWeight: FontWeight.w600), + ClipOval( + child: SizedBox.fromSize( + // Image radius + child: const Image( + image: + AssetImage("assets/images/exemple_profile.png"), + width: 40, + ), + ), + ), + Expanded( + flex: 8, + child: Padding( + padding: const EdgeInsets.only(left: 10), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Text( + "Melina", + style: GoogleFonts.plusJakartaSans( + color: Colors.white, + fontWeight: FontWeight.w600), + ), + Text( + "France, Lyon", + style: GoogleFonts.plusJakartaSans( + color: Colors.white.withOpacity(0.4), + fontWeight: FontWeight.w300, + fontSize: 13), + ) + ], + ), + ), ), Text( - "France, Lyon", + "Aujourd’hui, 16:43", style: GoogleFonts.plusJakartaSans( color: Colors.white.withOpacity(0.4), fontWeight: FontWeight.w300, fontSize: 13), - ) + ), ], ), - ), - ), - Text( - "Aujourd’hui, 16:43", - style: GoogleFonts.plusJakartaSans( - color: Colors.white.withOpacity(0.4), - fontWeight: FontWeight.w300, - fontSize: 13), - ), - ], - ), - SizedBox(height: 10), - ZoomTapAnimation( - onTap: callback, - enableLongTapRepeatEvent: false, - longTapRepeatDuration: const Duration(milliseconds: 100), - begin: 1.0, - end: 0.99, - beginDuration: const Duration(milliseconds: 70), - endDuration: const Duration(milliseconds: 100), - beginCurve: Curves.decelerate, - endCurve: Curves.easeInOutSine, - child: AspectRatio( - aspectRatio: 1 / 1, - child: Container( - decoration: BoxDecoration( - // add border - border: const GradientBoxBorder( - gradient: LinearGradient( - colors: [ - Colors.transparent, - Color(0xFF323232), - ], - begin: Alignment.topCenter, - end: Alignment.bottomCenter), - width: 2.5, - ), - // set border radius - borderRadius: BorderRadius.circular(20), - ), - child: ClipRRect( - borderRadius: BorderRadius.circular(18), - // implement image - child: Stack( - alignment: Alignment.bottomCenter, - children: [ - Image( - image: AssetImage("assets/images/exemple_cover.png"), - fit: BoxFit.cover, - width: double.infinity, - ), - Image( - image: AssetImage("assets/images/shadow_post.png"), - fit: BoxFit.fitHeight, - width: double.infinity, + SizedBox(height: 10), + ZoomTapAnimation( + onTap: widget.callback, + enableLongTapRepeatEvent: false, + longTapRepeatDuration: const Duration(milliseconds: 100), + begin: 1.0, + end: 0.99, + beginDuration: const Duration(milliseconds: 70), + endDuration: const Duration(milliseconds: 100), + beginCurve: Curves.decelerate, + endCurve: Curves.easeInOutSine, + child: AspectRatio( + aspectRatio: 1 / 1, + child: Container( + decoration: BoxDecoration( + // add border + border: const GradientBoxBorder( + gradient: LinearGradient( + colors: [ + Colors.transparent, + Color(0xFF323232), + ], + begin: Alignment.topCenter, + end: Alignment.bottomCenter), + width: 2.5, + ), + // set border radius + borderRadius: BorderRadius.circular(20), + ), + child: ClipRRect( + borderRadius: BorderRadius.circular(18), + // implement image + child: Stack( + alignment: Alignment.bottomCenter, + children: [ + Image( + image: AssetImage( + "assets/images/exemple_profile.png"), + fit: BoxFit.cover, + width: double.infinity, + ), + Positioned( + top: 0, + right: 0, + child: Padding( + padding: EdgeInsets.all(12), + child: Container( + constraints: BoxConstraints( + maxWidth: 140, maxHeight: 140), + width: 80.sp, + height: 80.sp, + decoration: BoxDecoration( + color: Colors.white, + // add border + border: Border.all( + width: 3, color: Colors.white), + // set border radius + borderRadius: + BorderRadius.circular(15), + ), + child: ClipRRect( + borderRadius: + BorderRadius.circular(13), + // implement image + child: Image( + image: AssetImage( + 'assets/images/exemple_cover.png'), + fit: BoxFit.cover, + ), + ), + ), + )) + ], + ), + ), ), - Padding( - padding: EdgeInsets.all(15), - child: AutoSizeText( - '“J’écoute en boucle ce son. B2O<3”', + )), + SizedBox(height: 15), + Row( + crossAxisAlignment: CrossAxisAlignment.end, + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + Flexible( + flex: 8, + child: TextScroll( + "BOOBA", style: GoogleFonts.plusJakartaSans( + height: 1, color: Colors.white, - fontWeight: FontWeight.w400, - fontSize: 15.sp), - maxFontSize: 20, - maxLines: 1, + fontWeight: FontWeight.w600, + fontSize: 26.h), + mode: TextScrollMode.endless, + pauseBetween: Duration(milliseconds: 500), + velocity: Velocity(pixelsPerSecond: Offset(20, 0)), + )), + Padding( + padding: EdgeInsets.only( + bottom: 10.h, right: 5.w, left: 5.w), + child: ClipOval( + child: Container( + width: 5.h, + height: 5.h, + color: Colors.white, ), ), - Positioned( - top: 0, - right: 0, - child: Padding( - padding: EdgeInsets.all(12), - child: Container( - constraints: BoxConstraints( - maxWidth: 140, maxHeight: 140), - width: 80.sp, - height: 80.sp, - decoration: BoxDecoration( + ), + Expanded( + flex: 8, + child: Padding( + padding: EdgeInsets.only(bottom: 2), + child: TextScroll( + "A.C. Milan", + style: GoogleFonts.plusJakartaSans( + height: 1, color: Colors.white, - // add border - border: - Border.all(width: 3, color: Colors.white), - // set border radius - borderRadius: BorderRadius.circular(15), - ), - child: ClipRRect( - borderRadius: BorderRadius.circular(13), - // implement image - child: Image( - image: AssetImage( - 'assets/images/exemple_profile.png'), - fit: BoxFit.cover, - ), - ), - ), - )) - ], - ), - ), - ), - )), - SizedBox(height: 10), - Row( - crossAxisAlignment: CrossAxisAlignment.end, - mainAxisAlignment: MainAxisAlignment.spaceBetween, - children: [ - Flexible( - flex: 8, - child: TextScroll( - "BOOBA", - style: GoogleFonts.plusJakartaSans( - height: 1, - color: Colors.white, - fontWeight: FontWeight.w600, - fontSize: 26.h), - mode: TextScrollMode.endless, - pauseBetween: Duration(milliseconds: 500), - velocity: Velocity(pixelsPerSecond: Offset(20, 0)), - )), - Padding( - padding: EdgeInsets.only(bottom: 10.h, right: 5.w, left: 5.w), - child: ClipOval( - child: Container( - width: 5.h, - height: 5.h, - color: Colors.white, + fontWeight: FontWeight.w300, + fontSize: 16.h), + mode: TextScrollMode.endless, + velocity: + Velocity(pixelsPerSecond: Offset(50, 20)), + pauseBetween: Duration(milliseconds: 500), + ), + )), + Container(width: 10), + AutoSizeText( + "2013", + style: GoogleFonts.plusJakartaSans( + color: Colors.white.withOpacity(0.5), + fontWeight: FontWeight.w300, + fontSize: 16.h), + textAlign: TextAlign.end, + maxFontSize: 20, + ), + ], ), - ), + ], ), - Expanded( - flex: 8, - child: Padding( - padding: EdgeInsets.only(bottom: 2), - child: TextScroll( - "A.C. Milan", + ); + } + return SizedBox( + width: double.infinity, + child: Column( + children: [ + Row( + crossAxisAlignment: CrossAxisAlignment.end, + children: [ + ClipOval( + child: SizedBox.fromSize( + // Image radius + child: const Image( + image: + AssetImage("assets/images/exemple_profile.png"), + width: 40, + ), + ), + ), + Expanded( + flex: 8, + child: Padding( + padding: const EdgeInsets.only(left: 10), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Text( + "Melina", + style: GoogleFonts.plusJakartaSans( + color: Colors.white, + fontWeight: FontWeight.w600), + ), + Text( + "France, Lyon", + style: GoogleFonts.plusJakartaSans( + color: Colors.white.withOpacity(0.4), + fontWeight: FontWeight.w300, + fontSize: 13), + ) + ], + ), + ), + ), + Text( + "Aujourd’hui, 16:43", style: GoogleFonts.plusJakartaSans( - height: 1, + color: Colors.white.withOpacity(0.4), + fontWeight: FontWeight.w300, + fontSize: 13), + ), + ], + ), + SizedBox(height: 10), + ZoomTapAnimation( + onTap: widget.callback, + enableLongTapRepeatEvent: false, + longTapRepeatDuration: const Duration(milliseconds: 100), + begin: 1.0, + end: 0.99, + beginDuration: const Duration(milliseconds: 70), + endDuration: const Duration(milliseconds: 100), + beginCurve: Curves.decelerate, + endCurve: Curves.easeInOutSine, + child: AspectRatio( + aspectRatio: 1 / 1, + child: Container( + decoration: BoxDecoration( + // add border + border: const GradientBoxBorder( + gradient: LinearGradient( + colors: [ + Colors.transparent, + Color(0xFF323232), + ], + begin: Alignment.topCenter, + end: Alignment.bottomCenter), + width: 2.5, + ), + // set border radius + borderRadius: BorderRadius.circular(20), + ), + child: ClipRRect( + borderRadius: BorderRadius.circular(18), + // implement image + child: Stack( + alignment: Alignment.bottomCenter, + children: [ + Image( + image: AssetImage( + "assets/images/exemple_cover.png"), + fit: BoxFit.cover, + width: double.infinity, + ), + Image( + image: + AssetImage("assets/images/shadow_post.png"), + fit: BoxFit.fitHeight, + width: double.infinity, + ), + Padding( + padding: EdgeInsets.all(15), + child: AutoSizeText( + '“J’écoute en boucle ce son. B2O<3”', + style: GoogleFonts.plusJakartaSans( + color: Colors.white, + fontWeight: FontWeight.w400, + fontSize: 15.sp), + maxFontSize: 20, + maxLines: 1, + ), + ), + Positioned( + top: 0, + right: 0, + child: Padding( + padding: EdgeInsets.all(12), + child: Container( + constraints: BoxConstraints( + maxWidth: 140, maxHeight: 140), + width: 80.sp, + height: 80.sp, + decoration: BoxDecoration( + color: Colors.white, + // add border + border: Border.all( + width: 3, color: Colors.white), + // set border radius + borderRadius: BorderRadius.circular(15), + ), + child: ClipRRect( + borderRadius: BorderRadius.circular(13), + // implement image + child: Image( + image: AssetImage( + 'assets/images/exemple_profile.png'), + fit: BoxFit.cover, + ), + ), + ), + )) + ], + ), + ), + ), + )), + SizedBox(height: 15), + Row( + crossAxisAlignment: CrossAxisAlignment.end, + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + Flexible( + flex: 8, + child: TextScroll( + "BOOBA", + style: GoogleFonts.plusJakartaSans( + height: 1, + color: Colors.white, + fontWeight: FontWeight.w600, + fontSize: 26.h), + mode: TextScrollMode.endless, + pauseBetween: Duration(milliseconds: 500), + velocity: Velocity(pixelsPerSecond: Offset(20, 0)), + )), + Padding( + padding: + EdgeInsets.only(bottom: 10.h, right: 5.w, left: 5.w), + child: ClipOval( + child: Container( + width: 5.h, + height: 5.h, color: Colors.white, + ), + ), + ), + Expanded( + flex: 8, + child: Padding( + padding: EdgeInsets.only(bottom: 2), + child: TextScroll( + "A.C. Milan", + style: GoogleFonts.plusJakartaSans( + height: 1, + color: Colors.white, + fontWeight: FontWeight.w300, + fontSize: 16.h), + mode: TextScrollMode.endless, + velocity: Velocity(pixelsPerSecond: Offset(50, 20)), + pauseBetween: Duration(milliseconds: 500), + ), + )), + Container(width: 10), + AutoSizeText( + "2013", + style: GoogleFonts.plusJakartaSans( + color: Colors.white.withOpacity(0.5), fontWeight: FontWeight.w300, fontSize: 16.h), - mode: TextScrollMode.endless, - velocity: Velocity(pixelsPerSecond: Offset(50, 20)), - pauseBetween: Duration(milliseconds: 500), + textAlign: TextAlign.end, + maxFontSize: 20, ), - )), - Container(width: 10), - AutoSizeText( - "2013", - style: GoogleFonts.plusJakartaSans( - color: Colors.white.withOpacity(0.5), - fontWeight: FontWeight.w300, - fontSize: 16.h), - textAlign: TextAlign.end, - maxFontSize: 20, - ), - ], - ), - ], + ], + ), + ], + ), + ); + }, ), ); } diff --git a/Sources/justMUSIC/lib/components/profile_component.dart b/Sources/justMUSIC/lib/components/profile_component.dart new file mode 100644 index 0000000..d70adb5 --- /dev/null +++ b/Sources/justMUSIC/lib/components/profile_component.dart @@ -0,0 +1,48 @@ +import 'package:auto_size_text/auto_size_text.dart'; +import 'package:flutter/cupertino.dart'; +import 'package:flutter/material.dart'; +import 'package:flutter_screenutil/flutter_screenutil.dart'; +import 'package:google_fonts/google_fonts.dart'; +import 'package:justmusic/components/statistics_component.dart'; + +import '../model/User.dart'; + +class ProfileComponent extends StatelessWidget { + final User user; + const ProfileComponent({Key? key, required this.user}) : super(key: key); + + @override + Widget build(BuildContext context) { + return Column( + children: [ + ClipOval( + child: ConstrainedBox( + constraints: BoxConstraints(maxWidth: 200, maxHeight: 200), + child: Image( + image: AssetImage("assets/images/exemple_profile.png"), + height: 100.w, + width: 100.w, + ), + ), + ), + SizedBox( + height: 10, + ), + AutoSizeText( + "@${user.pseudo}", + style: GoogleFonts.plusJakartaSans( + fontSize: 15.sp, + color: Colors.white, + fontWeight: FontWeight.w400), + maxFontSize: 30, + ), + SizedBox( + height: 20, + ), + StatisticsComponent( + user: user, + ), + ], + ); + } +} diff --git a/Sources/justMUSIC/lib/components/search_bar_component.dart b/Sources/justMUSIC/lib/components/search_bar_component.dart new file mode 100644 index 0000000..ca7cf9b --- /dev/null +++ b/Sources/justMUSIC/lib/components/search_bar_component.dart @@ -0,0 +1,36 @@ +import 'package:flutter/Material.dart'; +import 'package:google_fonts/google_fonts.dart'; + +import '../values/constants.dart'; + +class SearchBarComponent extends StatefulWidget { + final String? text; + final VoidCallback? callback; + const SearchBarComponent({Key? key, this.text, this.callback}) + : super(key: key); + + @override + State createState() => _SearchBarComponentState(); +} + +class _SearchBarComponentState extends State { + @override + Widget build(BuildContext context) { + return GestureDetector( + onTap: widget.callback, + child: ClipRRect( + borderRadius: BorderRadius.all(Radius.circular(20)), + child: Container( + constraints: BoxConstraints(maxWidth: 600), + color: searchBarColor, + width: double.infinity, + padding: EdgeInsets.fromLTRB(defaultPadding, 16, defaultPadding, 16), + child: Text( + widget.text ?? "Chercher une musique...", + style: GoogleFonts.plusJakartaSans(color: Colors.white), + ), + ), + ), + ); + } +} diff --git a/Sources/justMUSIC/lib/components/setting_part_component.dart b/Sources/justMUSIC/lib/components/setting_part_component.dart new file mode 100644 index 0000000..4541391 --- /dev/null +++ b/Sources/justMUSIC/lib/components/setting_part_component.dart @@ -0,0 +1,69 @@ +import 'package:flutter/material.dart'; +import 'package:google_fonts/google_fonts.dart'; +import 'package:justmusic/values/icons.dart'; + +import '../values/constants.dart'; + +class SettingPartComponent extends StatelessWidget { + final JustMusicIcon icon; + final String label; + final bool important; + const SettingPartComponent( + {Key? key, + required this.icon, + required this.label, + this.important = false}) + : super(key: key); + + @override + Widget build(BuildContext context) { + return Material( + color: important ? warningBttnColor : settingColor, + borderOnForeground: false, + child: InkWell( + onTap: () { + print('InkWell was tapped!'); + }, + splashColor: Colors.transparent, + highlightColor: Colors.white.withOpacity(0.08), + child: Container( + width: double.infinity, + child: Padding( + padding: const EdgeInsets.fromLTRB( + defaultPadding, 19, defaultPadding, 19), + child: Row( + children: [ + Image( + image: AssetImage(icon.imagePath), + width: 13, + ), + const SizedBox( + width: 15, + ), + Expanded( + flex: 10, + child: Text( + label, + overflow: TextOverflow.ellipsis, + style: GoogleFonts.plusJakartaSans( + color: Colors.white, fontWeight: FontWeight.w700), + ), + ), + Spacer(), + Transform( + alignment: Alignment.center, + transform: Matrix4.rotationY(3.14159265), + child: Image( + image: AssetImage("assets/images/return_icon.png"), + height: 11, + opacity: const AlwaysStoppedAnimation(.5), + ), + ), + ], + ), + ), + ), + ), + ); + } +} diff --git a/Sources/justMUSIC/lib/components/statistics_component.dart b/Sources/justMUSIC/lib/components/statistics_component.dart new file mode 100644 index 0000000..6324318 --- /dev/null +++ b/Sources/justMUSIC/lib/components/statistics_component.dart @@ -0,0 +1,82 @@ +import 'package:auto_size_text/auto_size_text.dart'; +import 'package:flutter/cupertino.dart'; +import 'package:flutter/material.dart'; +import 'package:flutter_screenutil/flutter_screenutil.dart'; +import 'package:google_fonts/google_fonts.dart'; + +import '../model/User.dart'; +import '../values/constants.dart'; + +class StatisticsComponent extends StatelessWidget { + final User user; + const StatisticsComponent({Key? key, required this.user}) : super(key: key); + + @override + Widget build(BuildContext context) { + return Row( + mainAxisSize: MainAxisSize.min, + children: [ + Expanded( + child: Column( + children: [ + AutoSizeText( + user.followed.toString(), + style: GoogleFonts.plusJakartaSans( + color: Colors.white, + fontWeight: FontWeight.bold, + fontSize: 15.w), + maxFontSize: 30, + ), + AutoSizeText( + "Suivis", + style: GoogleFonts.plusJakartaSans( + color: grayText, fontSize: 12.w), + maxFontSize: 30, + ) + ], + ), + ), + Column( + mainAxisSize: MainAxisSize.min, + children: [ + AutoSizeText( + user.followers.toString(), + style: GoogleFonts.plusJakartaSans( + color: Colors.white, + fontWeight: FontWeight.bold, + fontSize: 15.w), + maxFontSize: 30, + ), + AutoSizeText( + "Followers", + style: + GoogleFonts.plusJakartaSans(color: grayText, fontSize: 12.w), + maxFontSize: 30, + ) + ], + ), + Expanded( + child: Column( + mainAxisSize: MainAxisSize.min, + children: [ + AutoSizeText( + user.capsules.toString(), + style: GoogleFonts.plusJakartaSans( + color: Colors.white, + fontWeight: FontWeight.bold, + fontSize: 15.w), + maxFontSize: 30, + ), + AutoSizeText( + "Capsules", + style: GoogleFonts.plusJakartaSans( + color: grayText, fontSize: 12.w), + maxFontSize: 30, + ) + ], + ), + ), + ], + ); + } +} diff --git a/Sources/justMUSIC/lib/components/top_nav_bar_component.dart b/Sources/justMUSIC/lib/components/top_nav_bar_component.dart index cb73a50..59fe4f6 100644 --- a/Sources/justMUSIC/lib/components/top_nav_bar_component.dart +++ b/Sources/justMUSIC/lib/components/top_nav_bar_component.dart @@ -3,6 +3,7 @@ import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; import 'package:google_fonts/google_fonts.dart'; +import '../config/routes.dart'; import '../values/constants.dart'; class TopNavBarComponent extends StatefulWidget { @@ -33,11 +34,16 @@ class _TopNavBarComponentState extends State { crossAxisAlignment: CrossAxisAlignment.start, mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [ - const Flexible( + Flexible( flex: 1, - child: Image( - image: AssetImage("assets/images/add_friend.png"), - width: 25, + child: GestureDetector( + onTap: () { + Navigator.pushNamed(context, '/post'); + }, + child: const Image( + image: AssetImage("assets/images/add_friend.png"), + width: 25, + ), ), ), ConstrainedBox( @@ -45,7 +51,7 @@ class _TopNavBarComponentState extends State { child: Column( mainAxisAlignment: MainAxisAlignment.start, children: [ - Image( + const Image( image: AssetImage("assets/images/logo.png"), height: 30, ), @@ -124,12 +130,17 @@ class _TopNavBarComponentState extends State { ), Flexible( flex: 1, - child: ClipOval( - child: SizedBox.fromSize( - // Image radius - child: Image( - image: AssetImage("assets/images/exemple_profile.png"), - width: 25, + child: GestureDetector( + onTap: () { + Navigator.of(context).push(createRoute()); + }, + child: ClipOval( + child: SizedBox.fromSize( + // Image radius + child: const Image( + image: AssetImage("assets/images/exemple_profile.png"), + width: 25, + ), ), ), ), diff --git a/Sources/justMUSIC/lib/config/routes.dart b/Sources/justMUSIC/lib/config/routes.dart new file mode 100644 index 0000000..ca5cf74 --- /dev/null +++ b/Sources/justMUSIC/lib/config/routes.dart @@ -0,0 +1,21 @@ +import 'package:flutter/Material.dart'; +import 'package:justmusic/screens/profile_screen.dart'; + +Route createRoute() { + return PageRouteBuilder( + pageBuilder: (context, animation, secondaryAnimation) => + const ProfileScreen(), + transitionsBuilder: (context, animation, secondaryAnimation, child) { + const begin = Offset(1.0, 0.0); + const end = Offset.zero; + const curve = Curves.ease; + + var tween = Tween(begin: begin, end: end).chain(CurveTween(curve: curve)); + + return SlideTransition( + position: animation.drive(tween), + child: child, + ); + }, + ); +} diff --git a/Sources/justMUSIC/lib/main.dart b/Sources/justMUSIC/lib/main.dart index a633f84..1203f32 100644 --- a/Sources/justMUSIC/lib/main.dart +++ b/Sources/justMUSIC/lib/main.dart @@ -1,13 +1,24 @@ import 'package:flutter/material.dart'; import 'package:flutter/services.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart'; +import 'package:justmusic/screens/explanations_screen.dart'; import 'package:justmusic/screens/feed_screen.dart'; +import 'package:justmusic/screens/login_screen.dart'; +import 'package:justmusic/screens/post_screen.dart'; +import 'package:justmusic/screens/profile_screen.dart'; +import 'package:justmusic/screens/registration_screen.dart'; +import 'package:justmusic/screens/welcome_screen.dart'; +import 'package:justmusic/view_model/MusicViewModel.dart'; +import 'package:justmusic/view_model/UserViewModel.dart'; void main() { runApp(const MyApp()); } class MyApp extends StatelessWidget { + static UserViewModel userViewModel = UserViewModel(); + static MusicViewModel musicViewModel = MusicViewModel(); + const MyApp({super.key}); // This widget is the root of your application. @@ -18,6 +29,15 @@ class MyApp extends StatelessWidget { return ScreenUtilInit( builder: (context, child) { return MaterialApp( + routes: { + '/welcome': (context) => WellcomeScreen(), + '/feed': (context) => FeedScreen(), + '/login': (context) => LoginScreen(), + '/register': (context) => RegistrationScreen(), + '/post': (context) => PostScreen(), + '/profile': (context) => ProfileScreen(), + '/explanation': (context) => ExplanationsScreen(), + }, debugShowCheckedModeBanner: false, theme: ThemeData( // This is the theme of your application. @@ -31,9 +51,7 @@ class MyApp extends StatelessWidget { // is not restarted. primarySwatch: Colors.blue, ), - home: const SafeArea( - child: FeedScreen(), - )); + home: WellcomeScreen()); }, designSize: Size(390, 844), ); diff --git a/Sources/justMUSIC/lib/model/User.dart b/Sources/justMUSIC/lib/model/User.dart index f9a7607..f601867 100644 --- a/Sources/justMUSIC/lib/model/User.dart +++ b/Sources/justMUSIC/lib/model/User.dart @@ -4,10 +4,14 @@ class User { String _country; String _mail; String _pp; + int _followers; + int _capsules; + int _followed; List friends = []; // Constructor - User(this._id, this._pseudo, this._country, this._mail, this._pp); + User(this._id, this._pseudo, this._country, this._mail, this._pp, + this._followers, this._capsules, this._followed, this.friends); //Getters and setters int get id => _id; @@ -35,4 +39,22 @@ class User { set pp(String value) { _pp = value; } + + int get capsules => _capsules; + + set capsules(int value) { + _capsules = value; + } + + int get followed => _followed; + + set followed(int value) { + _followed = value; + } + + int get followers => _followers; + + set followers(int value) { + _followers = value; + } } diff --git a/Sources/justMUSIC/lib/screens/feed_screen.dart b/Sources/justMUSIC/lib/screens/feed_screen.dart index cae3a5d..3e2c6ea 100644 --- a/Sources/justMUSIC/lib/screens/feed_screen.dart +++ b/Sources/justMUSIC/lib/screens/feed_screen.dart @@ -1,8 +1,9 @@ import 'package:circular_reveal_animation/circular_reveal_animation.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; +import 'package:flutter/services.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart'; - +import 'package:google_fonts/google_fonts.dart'; import '../components/comment_component.dart'; import '../components/post_component.dart'; import '../components/top_nav_bar_component.dart'; @@ -52,6 +53,12 @@ class _FeedScreenState extends State animationController.forward(); } + Future resetFullScreen() async { + await SystemChannels.platform.invokeMethod( + 'SystemChrome.restoreSystemUIOverlays', + ); + } + void changeFeed(bool choice) { // Mettez ici le code pour l'action que vous souhaitez effectuer avec le paramètre if (choice) { @@ -82,12 +89,17 @@ class _FeedScreenState extends State borderRadius: BorderRadius.only( topLeft: Radius.circular(20), topRight: Radius.circular(20))), builder: ((context) { - return Container( + return GestureDetector( + onTap: () { + FocusScopeNode currentFocus = FocusScope.of(context); + if (!currentFocus.hasPrimaryFocus) { + currentFocus.unfocus(); + resetFullScreen(); + } + }, + child: Container( height: 720.h, - margin: EdgeInsets.only( - top: defaultPadding, - left: defaultPadding, - right: defaultPadding), + margin: const EdgeInsets.only(top: 10), child: Column( children: [ Align( @@ -95,32 +107,130 @@ class _FeedScreenState extends State width: 60, height: 5, decoration: BoxDecoration( - color: Colors.white, + color: Colors.white.withOpacity(0.3), borderRadius: BorderRadius.circular(20))), ), - SizedBox( - height: 10, + const SizedBox( + height: 20, ), Expanded( - child: SingleChildScrollView( - child: Wrap( - // to apply margin in the main axis of the wrap - runSpacing: 10, - children: [ - PostComponent( - callback: null, + child: ClipRRect( + borderRadius: BorderRadius.only( + topRight: Radius.circular(15), + topLeft: Radius.circular(15)), + child: Padding( + padding: EdgeInsets.only( + left: defaultPadding, right: defaultPadding), + child: SingleChildScrollView( + child: Wrap( + // to apply margin in the main axis of the wrap + runSpacing: 10, + children: [ + PostComponent( + callback: null, + ), + Container(height: 10), + Align( + child: RichText( + text: TextSpan( + text: "3", + style: GoogleFonts.plusJakartaSans( + color: Colors.white, + fontWeight: FontWeight.w600), + children: [ + TextSpan( + text: " commentaires", + style: GoogleFonts.plusJakartaSans( + color: Colors.white, + fontWeight: FontWeight.w300), + ) + ])), + ), + SizedBox(height: 20), + CommentComponent(), + CommentComponent(), + CommentComponent(), + Container(height: 10), + ], ), - Container(height: 40), - CommentComponent(), - CommentComponent(), - CommentComponent(), - Container(height: 10), - ], + ), ), ), ), + Padding( + padding: EdgeInsets.only( + bottom: MediaQuery.of(context).viewInsets.bottom), + child: Container( + height: 70, + width: double.infinity, + decoration: BoxDecoration( + border: Border( + top: BorderSide(color: grayColor, width: 2)), + color: textFieldMessage), + child: Center( + child: Padding( + padding: const EdgeInsets.symmetric(horizontal: 20), + child: Row( + children: [ + ClipOval( + child: SizedBox.fromSize( + // Image radius + child: const Image( + image: AssetImage( + "assets/images/exemple_profile.png"), + width: 45, + ), + ), + ), + SizedBox( + width: 10, + ), + Expanded( + child: TextField( + keyboardAppearance: Brightness.dark, + cursorColor: primaryColor, + keyboardType: TextInputType.emailAddress, + style: GoogleFonts.plusJakartaSans( + color: Colors.white), + decoration: InputDecoration( + suffixIcon: Icon( + Icons.send, + color: grayText, + size: 20, + ), + focusedBorder: OutlineInputBorder( + borderSide: BorderSide( + width: 1, color: grayText), + borderRadius: BorderRadius.all( + Radius.circular(100))), + contentPadding: EdgeInsets.only( + top: 0, + bottom: 0, + left: 20, + right: 20), + fillColor: bgModal, + filled: true, + focusColor: + Color.fromRGBO(255, 255, 255, 0.30), + enabledBorder: OutlineInputBorder( + borderSide: BorderSide( + width: 1, color: grayText), + borderRadius: BorderRadius.all( + Radius.circular(100))), + hintText: 'Ajoutez une réponse...', + hintStyle: GoogleFonts.plusJakartaSans( + color: grayText)), + ), + ) + ], + ), + ), + )), + ), ], - )); + ), + ), + ); }), ); } @@ -128,12 +238,12 @@ class _FeedScreenState extends State @override Widget build(BuildContext context) { return Scaffold( + resizeToAvoidBottomInset: true, backgroundColor: bgColor, body: Stack( children: [ CircularRevealAnimation( animation: animation, -// centerAlignment: Alignment.centerRight, centerOffset: Offset(30.w, -100), child: SingleChildScrollView( child: SizedBox( diff --git a/Sources/justMUSIC/lib/screens/login_screen.dart b/Sources/justMUSIC/lib/screens/login_screen.dart index 128ea86..778d76d 100644 --- a/Sources/justMUSIC/lib/screens/login_screen.dart +++ b/Sources/justMUSIC/lib/screens/login_screen.dart @@ -17,7 +17,6 @@ class LoginScreen extends StatefulWidget { class _LoginScreenState extends State { bool passenable = true; - final _focusNode = FocusNode(); final _formKey = GlobalKey(); @override @@ -97,6 +96,8 @@ class _LoginScreenState extends State { CrossAxisAlignment.end, children: [ TextFormField( + keyboardAppearance: + Brightness.dark, validator: (value) { if (value == null || value.isEmpty) { @@ -147,6 +148,8 @@ class _LoginScreenState extends State { height: 18, ), TextFormField( + keyboardAppearance: + Brightness.dark, obscureText: passenable, validator: (value) { if (value == null || @@ -430,6 +433,8 @@ class _LoginScreenState extends State { CrossAxisAlignment.end, children: [ TextFormField( + keyboardAppearance: + Brightness.dark, validator: (value) { if (value == null || value.isEmpty) { @@ -480,6 +485,8 @@ class _LoginScreenState extends State { height: 18, ), TextFormField( + keyboardAppearance: + Brightness.dark, obscureText: passenable, validator: (value) { if (value == null || diff --git a/Sources/justMUSIC/lib/screens/post_screen.dart b/Sources/justMUSIC/lib/screens/post_screen.dart new file mode 100644 index 0000000..e6a625b --- /dev/null +++ b/Sources/justMUSIC/lib/screens/post_screen.dart @@ -0,0 +1,126 @@ +import 'dart:ui'; +import 'package:flutter/Material.dart'; +import 'package:flutter_screenutil/flutter_screenutil.dart'; +import 'package:justmusic/components/back_button.dart'; +import 'package:justmusic/screens/search_song_screen.dart'; +import '../components/editable_post_component.dart'; +import '../components/post_button_component.dart'; +import '../values/constants.dart'; + +class PostScreen extends StatefulWidget { + const PostScreen({Key? key}) : super(key: key); + + @override + State createState() => _PostScreenState(); +} + +class _PostScreenState extends State + with SingleTickerProviderStateMixin { + final scrollController = ScrollController(); + late AnimationController _controller; + late Animation _animation; + + @override + void initState() { + _controller = AnimationController( + vsync: this, + duration: const Duration(milliseconds: 400), + ); + + _animation = Tween(begin: 0.0, end: 400.0).animate( + CurvedAnimation( + parent: _controller, + curve: Curves.easeOut, + ), + ); + super.initState(); + } + + void openDetailPost() { + showModalBottomSheet( + transitionAnimationController: _controller, + barrierColor: Colors.black.withOpacity(0.7), + backgroundColor: Colors.transparent, + elevation: 1, + constraints: const BoxConstraints( + maxWidth: 600, + ), + isScrollControlled: true, + context: context, + shape: const RoundedRectangleBorder( + borderRadius: BorderRadius.only( + topLeft: Radius.circular(20), topRight: Radius.circular(20))), + builder: ((context) { + return const ClipRRect( + borderRadius: BorderRadius.only( + topLeft: Radius.circular(20), topRight: Radius.circular(20)), + child: SearchSongScreen()); + }), + ); + } + + @override + Widget build(BuildContext context) { + return Scaffold( + resizeToAvoidBottomInset: true, + backgroundColor: bgColor, + extendBodyBehindAppBar: true, + appBar: PreferredSize( + preferredSize: Size(double.infinity, 80), + child: SafeArea( + child: Padding( + padding: const EdgeInsets.only( + left: defaultPadding, + right: defaultPadding, + top: defaultPadding), + child: Row( + children: [BackButtonComponent()], + ), + ), + ), + ), + body: Container( + padding: + const EdgeInsets.only(left: defaultPadding, right: defaultPadding), + width: double.infinity, + height: double.infinity, + decoration: const BoxDecoration( + image: DecorationImage( + image: AssetImage("assets/images/background_justMusic.png"), + fit: BoxFit.cover, + ), + ), + child: Stack( + alignment: Alignment.topCenter, + children: [ + ScrollConfiguration( + behavior: ScrollBehavior().copyWith(scrollbars: false), + child: SingleChildScrollView( + controller: scrollController, + child: Column( + mainAxisAlignment: MainAxisAlignment.end, + children: [ + SizedBox( + height: 100.h, + ), + GestureDetector( + onTap: openDetailPost, + child: EditablePostComponent(), + ), + SizedBox( + height: 40.h, + ), + PostButtonComponent(), + SizedBox( + height: 40.h, + ), + ], + ), + ), + ), + ], + ), + ), + ); + } +} diff --git a/Sources/justMUSIC/lib/screens/profile_screen.dart b/Sources/justMUSIC/lib/screens/profile_screen.dart new file mode 100644 index 0000000..896cd91 --- /dev/null +++ b/Sources/justMUSIC/lib/screens/profile_screen.dart @@ -0,0 +1,146 @@ +import 'package:flutter/cupertino.dart'; +import 'package:flutter/material.dart'; +import 'package:flutter_screenutil/flutter_screenutil.dart'; +import 'package:google_fonts/google_fonts.dart'; +import 'package:justmusic/values/icons.dart'; +import '../components/profile_component.dart'; +import '../components/setting_part_component.dart'; +import '../main.dart'; +import '../values/constants.dart'; + +class ProfileScreen extends StatefulWidget { + const ProfileScreen({Key? key}) : super(key: key); + + @override + State createState() => _ProfileScreenState(); +} + +class _ProfileScreenState extends State { + @override + Widget build(BuildContext context) { + return Scaffold( + appBar: PreferredSize( + preferredSize: Size(double.infinity, 58), + child: Container( + height: double.infinity, + color: bgAppBar, + child: Padding( + padding: const EdgeInsets.symmetric(horizontal: defaultPadding), + child: Stack( + alignment: Alignment.centerLeft, + children: [ + GestureDetector( + onTap: () { + Navigator.pop(context); + }, + child: Container( + height: 15, + width: 15, + child: Image( + image: AssetImage("assets/images/return_icon.png"), + height: 8, + ), + )), + Align( + child: Text( + "Profile", + style: GoogleFonts.plusJakartaSans( + color: Colors.white, + fontSize: 14, + fontWeight: FontWeight.bold), + ), + ) + ], + ), + ), + ), + ), + body: Container( + width: double.infinity, + height: double.infinity, + color: bgColor, + child: SingleChildScrollView( + child: Padding( + padding: const EdgeInsets.symmetric(horizontal: settingPadding), + child: Column( + mainAxisAlignment: MainAxisAlignment.start, + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Padding( + padding: EdgeInsets.only(top: 68.h, bottom: 40), + child: + ProfileComponent(user: MyApp.userViewModel.userCurrent), + ), + Padding( + padding: + const EdgeInsets.only(bottom: 12, left: defaultPadding), + child: Text( + "Compte", + style: GoogleFonts.plusJakartaSans( + color: grayText, + fontWeight: FontWeight.w800, + fontSize: 16), + ), + ), + ClipRRect( + borderRadius: BorderRadius.circular(8), + child: Column( + children: const [ + SettingPartComponent( + icon: JustMusicIcon.profile, + label: 'Compte', + ), + SettingPartComponent( + icon: JustMusicIcon.history, + label: 'Historiques des capsules', + ), + SettingPartComponent( + icon: JustMusicIcon.spotify, + label: 'Lier un compte Spotify', + ), + SettingPartComponent( + icon: JustMusicIcon.trash, + label: 'Supprimer mon compte', + ), + SettingPartComponent( + icon: JustMusicIcon.cross, + label: 'Déconnexion', + important: true, + ), + ], + ), + ), + Padding( + padding: const EdgeInsets.only( + bottom: 12, left: defaultPadding, top: 40), + child: Text( + "Préférences", + style: GoogleFonts.plusJakartaSans( + color: grayText, + fontWeight: FontWeight.w800, + fontSize: 16), + ), + ), + ClipRRect( + borderRadius: BorderRadius.circular(8), + child: Column( + children: const [ + SettingPartComponent( + icon: JustMusicIcon.theme, + label: 'Thême de l\'application', + ), + SettingPartComponent( + icon: JustMusicIcon.notification, + label: 'Notifications', + ), + ], + ), + ) + ], + ), + ), + ), + ), + ); + } +} diff --git a/Sources/justMUSIC/lib/screens/registration_screen.dart b/Sources/justMUSIC/lib/screens/registration_screen.dart index b686e48..679fd11 100644 --- a/Sources/justMUSIC/lib/screens/registration_screen.dart +++ b/Sources/justMUSIC/lib/screens/registration_screen.dart @@ -83,6 +83,7 @@ class _RegistrationScreenState extends State { left: defaultPadding, right: defaultPadding), child: TextFormField( + keyboardAppearance: Brightness.dark, validator: (value) { if (value == null || value.isEmpty) { return 'TODO'; @@ -120,6 +121,7 @@ class _RegistrationScreenState extends State { left: defaultPadding, right: defaultPadding), child: TextFormField( + keyboardAppearance: Brightness.dark, validator: (value) { if (value == null || value.isEmpty) { return 'TODO'; @@ -157,6 +159,7 @@ class _RegistrationScreenState extends State { left: defaultPadding, right: defaultPadding), child: TextFormField( + keyboardAppearance: Brightness.dark, obscureText: passenable, validator: (value) { if (value == null || value.isEmpty) { @@ -221,6 +224,7 @@ class _RegistrationScreenState extends State { left: defaultPadding, right: defaultPadding), child: TextFormField( + keyboardAppearance: Brightness.dark, obscureText: passenable, validator: (value) { if (value == null || value.isEmpty) { diff --git a/Sources/justMUSIC/lib/screens/search_song_screen.dart b/Sources/justMUSIC/lib/screens/search_song_screen.dart new file mode 100644 index 0000000..30b1757 --- /dev/null +++ b/Sources/justMUSIC/lib/screens/search_song_screen.dart @@ -0,0 +1,169 @@ +import 'dart:async'; +import 'dart:ui'; + +import 'package:flutter/Material.dart'; +import 'package:flutter/services.dart'; +import 'package:google_fonts/google_fonts.dart'; +import 'package:justmusic/model/Music.dart'; + +import '../components/music_list_component.dart'; +import '../values/constants.dart'; +import '../main.dart'; + +class SearchSongScreen extends StatefulWidget { + const SearchSongScreen({Key? key}) : super(key: key); + + @override + State createState() => _SearchSongScreenState(); +} + +class _SearchSongScreenState extends State { + final ScrollController _scrollController = ScrollController(); + final TextEditingController _textEditingController = TextEditingController(); + + Future resetFullScreen() async { + await SystemChannels.platform.invokeMethod( + 'SystemChrome.restoreSystemUIOverlays', + ); + } + + @override + void initState() { + super.initState(); + _scrollController.addListener(_scrollListener); + } + + Future _scrollListener() async { + if (_scrollController.position.pixels == + _scrollController.position.maxScrollExtent) { + filteredData.addAll(await MyApp.musicViewModel.getMusicsWithName( + _textEditingController.text, + limit: 10, + offset: filteredData.length)); + setState(() { + filteredData = filteredData; + }); + } + if (_scrollController.offset >= + _scrollController.position.maxScrollExtent && + !_scrollController.position.outOfRange) { + setState(() { + //you can do anything here + }); + } + if (_scrollController.offset <= + _scrollController.position.minScrollExtent && + !_scrollController.position.outOfRange) { + setState(() { + Timer(Duration(milliseconds: 1), () => _scrollController.jumpTo(0)); + }); + } + } + + List filteredData = []; + + @override + Widget build(BuildContext context) { + double screenHeight = MediaQuery.of(context).size.height; + return GestureDetector( + onTap: () { + FocusScopeNode currentFocus = FocusScope.of(context); + if (!currentFocus.hasPrimaryFocus) { + currentFocus.unfocus(); + resetFullScreen(); + } + }, + child: BackdropFilter( + filter: ImageFilter.blur( + sigmaX: 60.0, + sigmaY: 60.0, + ), + child: Container( + color: bgAppBar.withOpacity(0.5), + height: screenHeight - 50, + padding: const EdgeInsets.only(top: 10), + child: Column( + children: [ + Align( + child: Container( + width: 60, + height: 5, + decoration: BoxDecoration( + color: Color(0xFF3A3A3A).withOpacity(0.6), + borderRadius: BorderRadius.circular(20))), + ), + const SizedBox( + height: 10, + ), + Padding( + padding: + const EdgeInsets.only(bottom: 10, left: 20, right: 20), + child: SizedBox( + height: 40, + child: TextField( + controller: _textEditingController, + keyboardAppearance: Brightness.dark, + onEditingComplete: resetFullScreen, + onChanged: (value) async { + if (_textEditingController.text.isEmpty) { + } else if (value == " ") { + print("popular"); + } else { + filteredData = await MyApp.musicViewModel + .getMusicsWithName(value); + setState(() { + filteredData = filteredData; + }); + } + }, + cursorColor: Colors.white, + keyboardType: TextInputType.text, + style: GoogleFonts.plusJakartaSans(color: grayText), + decoration: InputDecoration( + prefixIcon: const Icon( + Icons.search, + color: grayColor, + ), + focusedBorder: const OutlineInputBorder( + borderSide: + BorderSide(width: 1, color: grayColor), + borderRadius: + BorderRadius.all(Radius.circular(10))), + contentPadding: const EdgeInsets.only( + top: 0, + bottom: 0, + left: defaultPadding, + right: defaultPadding), + fillColor: searchBarColor, + filled: true, + focusColor: grayText, + enabledBorder: const OutlineInputBorder( + borderSide: + BorderSide(width: 1, color: grayColor), + borderRadius: + BorderRadius.all(Radius.circular(10))), + hintText: 'Chercher un son', + hintStyle: + GoogleFonts.plusJakartaSans(color: grayColor)), + ), + ), + ), + Flexible( + child: ScrollConfiguration( + behavior: ScrollBehavior().copyWith(scrollbars: true), + child: ListView.builder( + controller: _scrollController, + itemCount: filteredData.length, + itemBuilder: (context, index) { + return Padding( + padding: const EdgeInsets.symmetric(horizontal: 20), + child: MusicListComponent(music: filteredData[index]), + ); + }), + )) + ], + ), + ), + )); + } +} diff --git a/Sources/justMUSIC/lib/values/constants.dart b/Sources/justMUSIC/lib/values/constants.dart index 0bc9068..f29ef36 100644 --- a/Sources/justMUSIC/lib/values/constants.dart +++ b/Sources/justMUSIC/lib/values/constants.dart @@ -14,8 +14,13 @@ const strokeTextField = Color(0xFF373546); const unactiveFeed = Color(0xFF848484); const gradiantPost = Color(0xFF0D0D0D); const bgModal = Color(0xFF1E1E1E); +const textFieldMessage = Color(0xFF232323); const bgComment = Color(0xFF222222); - +const bgAppBar = Color(0xFF181818); +const grayText = Color(0xFF898989); +const settingColor = Color(0xFF232323); +const searchBarColor = Color(0xFF161616); // All constants important too us const defaultPadding = 30.0; +const settingPadding = 12.0; diff --git a/Sources/justMUSIC/lib/values/icons.dart b/Sources/justMUSIC/lib/values/icons.dart new file mode 100644 index 0000000..1cd01d1 --- /dev/null +++ b/Sources/justMUSIC/lib/values/icons.dart @@ -0,0 +1,33 @@ +enum JustMusicIcon { + profile, + spotify, + trash, + cross, + history, + theme, + notification +} + +extension MyIconExtension on JustMusicIcon { + String get imagePath { + switch (this) { + case JustMusicIcon.profile: + return 'assets/images/profile_icon.png'; + case JustMusicIcon.spotify: + return 'assets/images/spotify_icon.png'; + case JustMusicIcon.trash: + return 'assets/images/trash_icon.png'; + case JustMusicIcon.cross: + return 'assets/images/cross_icon.png'; + case JustMusicIcon.history: + return 'assets/images/history_icon.png'; + case JustMusicIcon.theme: + return 'assets/images/theme_icon.png'; + case JustMusicIcon.notification: + return 'assets/images/notification_icon.png'; + + default: + throw 'assets/images/unknown.png'; + } + } +} diff --git a/Sources/justMUSIC/lib/view_model/MusicViewModel.dart b/Sources/justMUSIC/lib/view_model/MusicViewModel.dart index 5f0f0eb..668526a 100644 --- a/Sources/justMUSIC/lib/view_model/MusicViewModel.dart +++ b/Sources/justMUSIC/lib/view_model/MusicViewModel.dart @@ -70,7 +70,7 @@ class MusicViewModel { var accessToken = await _token.getAccessToken(); var response = await http.get( Uri.parse( - '$API_URL/search?q=track%3A$name&type=track&market=$market&limit=$limit&offset=$offset'), + '$API_URL/search?q=track%3A$name&type=track&market=fr&limit=$limit&offset=$offset'), headers: { 'Authorization': 'Bearer $accessToken', }); @@ -89,7 +89,7 @@ class MusicViewModel { var accessToken = await _token.getAccessToken(); var response = await http.get( Uri.parse( - '$API_URL/search?q=artist%3A$name&type=track&market=$market&limit=$limit&offset=$offset'), + '$API_URL/search?q=artist%3A$name&type=track&market=fr&limit=$limit&offset=$offset'), headers: { 'Authorization': 'Bearer $accessToken', }); diff --git a/Sources/justMUSIC/lib/view_model/UserViewModel.dart b/Sources/justMUSIC/lib/view_model/UserViewModel.dart index bea7efd..2aaa1fb 100644 --- a/Sources/justMUSIC/lib/view_model/UserViewModel.dart +++ b/Sources/justMUSIC/lib/view_model/UserViewModel.dart @@ -1,9 +1,15 @@ import '../model/User.dart'; class UserViewModel { - User? _userCurrent; + User _userCurrent = User( + 1, "MelinaShow", "France", "test@gmail.com", "zezrzrzr", 5, 12, 114, []); + + User get userCurrent => _userCurrent; + + set userCurrent(User value) { + _userCurrent = value; + } // Constructor - // Constructor UserViewModel(); // Methods diff --git a/Sources/justMUSIC/pubspec.lock b/Sources/justMUSIC/pubspec.lock index 28fd5eb..685a4a9 100644 --- a/Sources/justMUSIC/pubspec.lock +++ b/Sources/justMUSIC/pubspec.lock @@ -9,6 +9,62 @@ packages: url: "https://pub.dev" source: hosted version: "2.10.0" + audioplayers: + dependency: "direct main" + description: + name: audioplayers + sha256: "61583554386721772f9309f509e17712865b38565a903c761f96b1115a979282" + url: "https://pub.dev" + source: hosted + version: "4.1.0" + audioplayers_android: + dependency: transitive + description: + name: audioplayers_android + sha256: dbdc9b7f2aa2440314c638aa55aadd45c7705e8340d5eddf2e3fb8da32d4ae2c + url: "https://pub.dev" + source: hosted + version: "3.0.2" + audioplayers_darwin: + dependency: transitive + description: + name: audioplayers_darwin + sha256: "6aea96df1d12f7ad5a71d88c6d1b22a216211a9564219920124c16768e456e9d" + url: "https://pub.dev" + source: hosted + version: "4.1.0" + audioplayers_linux: + dependency: transitive + description: + name: audioplayers_linux + sha256: "396b62ac62c92dd26c3bc5106583747f57a8b325ebd2b41e5576f840cfc61338" + url: "https://pub.dev" + source: hosted + version: "2.1.0" + audioplayers_platform_interface: + dependency: transitive + description: + name: audioplayers_platform_interface + sha256: f7daaed4659143094151ecf6bacd927d29ab8acffba98c110c59f0b81ae51143 + url: "https://pub.dev" + source: hosted + version: "5.0.1" + audioplayers_web: + dependency: transitive + description: + name: audioplayers_web + sha256: ec84fd46eed1577148ed4113f5998a36a18da4fce7170c37ce3e21b631393339 + url: "https://pub.dev" + source: hosted + version: "3.1.0" + audioplayers_windows: + dependency: transitive + description: + name: audioplayers_windows + sha256: "1d3aaac98a192b8488167711ba1e67d8b96333e8d0572ede4e2912e5bbce69a3" + url: "https://pub.dev" + source: hosted + version: "2.0.2" auto_size_text: dependency: "direct main" description: @@ -97,11 +153,27 @@ packages: url: "https://pub.dev" source: hosted version: "2.0.2" + file: + dependency: transitive + description: + name: file + sha256: "1b92bec4fc2a72f59a8e15af5f52cd441e4a7860b49499d69dfa817af20e925d" + url: "https://pub.dev" + source: hosted + version: "6.1.4" flutter: dependency: "direct main" description: flutter source: sdk version: "0.0.0" + flutter_animated_play_button: + dependency: "direct main" + description: + name: flutter_animated_play_button + sha256: dd955a450a4514e935e2f410afbd03b3bcf5f31b933a8f1334199caa3c6a81e2 + url: "https://pub.dev" + source: hosted + version: "0.3.0" flutter_lints: dependency: "direct dev" description: @@ -131,6 +203,11 @@ packages: description: flutter source: sdk version: "0.0.0" + flutter_web_plugins: + dependency: transitive + description: flutter + source: sdk + version: "0.0.0" font_awesome_flutter: dependency: transitive description: @@ -179,6 +256,14 @@ packages: url: "https://pub.dev" source: hosted version: "4.0.2" + ionicons: + dependency: "direct main" + description: + name: ionicons + sha256: "5496bc65a16115ecf05b15b78f494ee4a8869504357668f0a11d689e970523cf" + url: "https://pub.dev" + source: hosted + version: "0.2.2" js: dependency: transitive description: @@ -344,6 +429,14 @@ packages: url: "https://pub.dev" source: hosted version: "1.2.0" + synchronized: + dependency: transitive + description: + name: synchronized + sha256: "5fcbd27688af6082f5abd611af56ee575342c30e87541d0245f7ff99faa02c60" + url: "https://pub.dev" + source: hosted + version: "3.1.0" term_glyph: dependency: transitive description: @@ -368,6 +461,14 @@ packages: url: "https://pub.dev" source: hosted version: "0.2.0" + top_snackbar_flutter: + dependency: "direct main" + description: + name: top_snackbar_flutter + sha256: "22d14664a13db6ac714934c3382bd8d4daa57fb888a672f922df71981c5a5cb2" + url: "https://pub.dev" + source: hosted + version: "3.1.0" typed_data: dependency: transitive description: @@ -376,6 +477,14 @@ packages: url: "https://pub.dev" source: hosted version: "1.3.2" + uuid: + dependency: transitive + description: + name: uuid + sha256: "648e103079f7c64a36dc7d39369cabb358d377078a051d6ae2ad3aa539519313" + url: "https://pub.dev" + source: hosted + version: "3.0.7" vector_math: dependency: transitive description: diff --git a/Sources/justMUSIC/pubspec.yaml b/Sources/justMUSIC/pubspec.yaml index c84080c..1a52f91 100644 --- a/Sources/justMUSIC/pubspec.yaml +++ b/Sources/justMUSIC/pubspec.yaml @@ -49,6 +49,10 @@ dependencies: zoom_tap_animation: ^1.1.0 custom_draggable_widget: ^0.0.2 modal_bottom_sheet: ^2.1.2 + flutter_animated_play_button: ^0.3.0 + audioplayers: ^4.1.0 + ionicons: ^0.2.2 + top_snackbar_flutter: ^3.1.0 dev_dependencies: flutter_test: @@ -75,6 +79,7 @@ flutter: # To add assets to your application, add an assets section, like this: assets: - assets/images/ + - assets/ # An image asset can refer to one or more resolution-specific "variants", see # https://flutter.dev/assets-and-images/#resolution-aware