diff --git a/justMUSIC/assets/images/presentation.png b/justMUSIC/assets/images/presentation.png new file mode 100644 index 0000000..cd1e8e2 Binary files /dev/null and b/justMUSIC/assets/images/presentation.png differ diff --git a/justMUSIC/lib/components/Finish_button.dart b/justMUSIC/lib/components/Finish_button.dart new file mode 100644 index 0000000..e6dc6e6 --- /dev/null +++ b/justMUSIC/lib/components/Finish_button.dart @@ -0,0 +1,64 @@ +import 'package:flutter/cupertino.dart'; +import 'package:flutter/material.dart'; +import 'package:flutter_screenutil/flutter_screenutil.dart'; + +class FinishButton extends StatefulWidget { + const FinishButton({Key? key}) : super(key: key); + + @override + State createState() => _FinishButtonState(); +} + +class _FinishButtonState extends State { + @override + Widget build(BuildContext context) { + return ElevatedButton( + onPressed: () {}, + style: ButtonStyle( + backgroundColor: MaterialStateProperty.all(Color(0xFF1C1C1C)), + overlayColor: + MaterialStateProperty.all(Color(0xffD3C2FF).withOpacity(0.2)), + shape: MaterialStateProperty.all(RoundedRectangleBorder( + borderRadius: BorderRadius.circular(18), + )), + padding: MaterialStateProperty.all(EdgeInsets.all(0.0)), + ), + child: Ink( + decoration: BoxDecoration( + gradient: RadialGradient( + center: Alignment(0, 3), + focalRadius: 10, + radius: 2.5, + stops: [0.4, 1.0], + colors: [Color(0xff9E78FF), Color(0xff633AF4)], + ), + borderRadius: BorderRadius.circular(18.0), + border: Border.all( + color: Color(0xff1C1C1C), + width: 5, + ), + ), + child: Container( + padding: EdgeInsets.only(top: 20.h, bottom: 20.h), + constraints: BoxConstraints(maxWidth: 600, minHeight: 50), + decoration: BoxDecoration( + boxShadow: [ + BoxShadow( + color: Color(0xff7E56F9).withOpacity(0.23), + spreadRadius: 4, + blurRadius: 40, + offset: Offset(0, 3), // changes position of shadow + ), + ], + ), + alignment: Alignment.center, + child: Text( + "Terminer", + textAlign: TextAlign.center, + style: TextStyle(color: Colors.white, fontSize: 18), + ), + ), + ), + ); + } +} diff --git a/justMUSIC/lib/main.dart b/justMUSIC/lib/main.dart index 6834ce3..bac6ccc 100644 --- a/justMUSIC/lib/main.dart +++ b/justMUSIC/lib/main.dart @@ -1,7 +1,7 @@ import 'package:flutter/material.dart'; import 'package:flutter/services.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart'; -import 'package:justmusic/screens/registration_screen.dart'; +import 'package:justmusic/screens/explanations_screen.dart'; void main() { runApp(const MyApp()); @@ -31,7 +31,7 @@ class MyApp extends StatelessWidget { // is not restarted. primarySwatch: Colors.blue, ), - home: const RegistrationScreen(), + home: const ExplanationsScreen(), ); }, designSize: Size(390, 844), diff --git a/justMUSIC/lib/screens/explanations_screen.dart b/justMUSIC/lib/screens/explanations_screen.dart new file mode 100644 index 0000000..8fe35ad --- /dev/null +++ b/justMUSIC/lib/screens/explanations_screen.dart @@ -0,0 +1,148 @@ +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 '../components/Finish_button.dart'; + +import '../values/constants.dart'; + +class ExplanationsScreen extends StatelessWidget { + const ExplanationsScreen({Key? key}) : super(key: key); + + @override + Widget build(BuildContext context) { + return Scaffold( + backgroundColor: bgColor, + body: Stack( + children: [ + SingleChildScrollView( + child: SizedBox( + width: double.infinity, + child: Align( + child: ConstrainedBox( + constraints: BoxConstraints(maxWidth: 600), + child: Padding( + padding: const EdgeInsets.symmetric( + horizontal: defaultPadding), + child: Container( + width: double.infinity, + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Padding( + padding: EdgeInsets.only(top: 70.h), + child: AutoSizeText( + "Bravo!", + style: GoogleFonts.plusJakartaSans( + color: Colors.white, + fontWeight: FontWeight.w600, + fontSize: 32.w), + maxLines: 1, + maxFontSize: 50, + overflow: TextOverflow.fade, + ), + ), + Padding( + padding: EdgeInsets.only(top: 20), + child: ConstrainedBox( + constraints: BoxConstraints(maxWidth: 250), + child: AutoSizeText( + "Tu fais à présent parti de la communauté.", + style: GoogleFonts.plusJakartaSans( + color: Colors.white, + fontWeight: FontWeight.w200, + fontSize: 15.w), + maxFontSize: 20, + textAlign: TextAlign.start, + ), + ), + ), + SizedBox(height: 30.h), + Align( + child: SizedBox( + width: 330.h, + child: Image( + image: AssetImage( + "assets/images/presentation.png")), + ), + ), + Align( + child: Padding( + padding: EdgeInsets.only(top: 10.h), + child: AutoSizeText( + "Découvre des sons", + style: GoogleFonts.plusJakartaSans( + color: Colors.white, + fontWeight: FontWeight.w600, + fontSize: 28.w), + maxLines: 1, + maxFontSize: 50, + overflow: TextOverflow.fade, + ), + ), + ), + Padding( + padding: EdgeInsets.only( + top: defaultPadding.h, + bottom: defaultPadding.h), + child: Align( + alignment: Alignment.center, + child: AutoSizeText( + "Explore ton Feed d’amis et les découvertes, pour découvrir ce qu’écoute tes amis et bien d’autres.", + style: GoogleFonts.plusJakartaSans( + color: Colors.white.withOpacity(0.6), + fontWeight: FontWeight.w200, + fontSize: 14.w), + maxFontSize: 20, + textAlign: TextAlign.center, + ), + ), + ), + const SizedBox(width: 600, child: FinishButton()), + ], + ), + ), + ), + ), + )), + ), + IgnorePointer( + child: Container( + height: 240.h, + decoration: BoxDecoration( + gradient: LinearGradient(begin: Alignment.topRight, stops: [ + 0, + 1 + ], colors: [ + bgColor.withOpacity(1), + bgColor.withOpacity(0) + ])), + ), + ), + Align( + alignment: Alignment.topCenter, + child: ConstrainedBox( + constraints: BoxConstraints(maxWidth: 800), + child: Padding( + padding: EdgeInsets.only( + top: 45.h, left: defaultPadding, right: defaultPadding), + child: ClipRRect( + borderRadius: BorderRadius.circular(10.0), + child: LinearProgressIndicator( + minHeight: 5, + value: 1, + backgroundColor: grayColor, + color: primaryColor, + ), + ), + ), + ), + ), + ], + ), + ); + } +} diff --git a/justMUSIC/lib/screens/registration_screen.dart b/justMUSIC/lib/screens/registration_screen.dart index a022578..b686e48 100644 --- a/justMUSIC/lib/screens/registration_screen.dart +++ b/justMUSIC/lib/screens/registration_screen.dart @@ -352,7 +352,7 @@ class _RegistrationScreenState extends State { constraints: BoxConstraints(maxWidth: 800), child: Padding( padding: EdgeInsets.only( - top: 45, left: defaultPadding, right: defaultPadding), + top: 45.h, left: defaultPadding, right: defaultPadding), child: ClipRRect( borderRadius: BorderRadius.circular(10.0), child: LinearProgressIndicator(