diff --git a/daflmusic/assets/images/valid_logo.png b/daflmusic/assets/images/valid_logo.png new file mode 100644 index 0000000..6721449 Binary files /dev/null and b/daflmusic/assets/images/valid_logo.png differ diff --git a/daflmusic/lib/dafl_card.dart b/daflmusic/lib/dafl_card.dart new file mode 100644 index 0000000..6fcc287 --- /dev/null +++ b/daflmusic/lib/dafl_card.dart @@ -0,0 +1,33 @@ + +import 'package:flutter/cupertino.dart'; +import 'package:flutter_swipable/flutter_swipable.dart'; + +class DaflCard extends StatelessWidget { + final color; + double taille = 0; + + DaflCard({required this.color}); + @override + Widget build(BuildContext context) { + return Swipable( + onSwipeLeft: (finalposition){ + print('dislike'); + }, + onSwipeRight: (finalposition){ + print('like'); + }, + onSwipeUp: (finalposition){ + print('discovery'); + }, + child: Container( + decoration: BoxDecoration( + image: DecorationImage( + image: AssetImage( + 'assets/images/pochette.png'), + fit: BoxFit.cover, + ), + borderRadius: BorderRadius.all(Radius.circular(20)) + ), + height: 565,),); + } +} diff --git a/daflmusic/lib/icons.dart b/daflmusic/lib/icons.dart new file mode 100644 index 0000000..cbe8117 --- /dev/null +++ b/daflmusic/lib/icons.dart @@ -0,0 +1,13 @@ +import 'package:flutter/widgets.dart'; + +class MyFlutterApp { + MyFlutterApp._(); + + static const _kFontFam = 'MyFlutterApp'; + static const String? _kFontPkg = null; + + static const IconData podium = IconData(0xe804, fontFamily: _kFontFam, fontPackage: _kFontPkg); + static const IconData podium_outine = IconData(0xe805, fontFamily: _kFontFam, fontPackage: _kFontPkg); + static const IconData Spots = IconData(0xe809, fontFamily: _kFontFam, fontPackage: _kFontPkg); + static const IconData Spots_outline = IconData(0xe80a, fontFamily: _kFontFam, fontPackage: _kFontPkg); +} \ No newline at end of file diff --git a/daflmusic/lib/main.dart b/daflmusic/lib/main.dart new file mode 100644 index 0000000..22445f2 --- /dev/null +++ b/daflmusic/lib/main.dart @@ -0,0 +1,40 @@ +import 'package:daflmusic/mainPage/main_mainpage.dart'; +import 'package:flutter/material.dart'; +import 'package:flutter/services.dart'; +import 'package:daflmusic/signInPage/main_signIn_page.dart'; +import 'package:daflmusic/homePage/main_homepage.dart'; +import 'package:daflmusic/signUpPage/main_signUp_page.dart'; + + +void main() { + runApp(const MyApp()); +} + +class MyApp extends StatelessWidget { + const MyApp({super.key}); + + // This widget is the root of your application. + @override + Widget build(BuildContext context) { + SystemChrome.setEnabledSystemUIMode( + SystemUiMode.immersiveSticky + ); + return MaterialApp( + debugShowCheckedModeBanner: false, + title: 'Flutter Demo', + theme: ThemeData( + // This is the theme of your application. + // + // Try running your application with "flutter run". You'll see the + // application has a blue toolbar. Then, without quitting the app, try + // changing the primarySwatch below to Colors.green and then invoke + // "hot reload" (press "r" in the console where you ran "flutter run", + // or simply save your changes to "hot reload" in a Flutter IDE). + // Notice that the counter didn't reset back to zero; the application + // is not restarted. + primarySwatch: Colors.blue, + ), + home: MainHomePage(), + ); + } +} \ No newline at end of file diff --git a/daflmusic/lib/mainPage/main_mainpage.dart b/daflmusic/lib/mainPage/main_mainpage.dart new file mode 100644 index 0000000..f1610ae --- /dev/null +++ b/daflmusic/lib/mainPage/main_mainpage.dart @@ -0,0 +1,56 @@ + +import 'package:daflmusic/icons.dart'; +import 'package:daflmusic/widgets/spots.dart'; +import 'package:flutter/cupertino.dart'; +import 'package:flutter/material.dart'; +import 'package:page_transition/page_transition.dart'; +import 'package:daflmusic/signInPage/main_signIn_page.dart'; +import 'package:daflmusic/homePage/main_homepage.dart'; +import 'package:daflmusic/signUpPage/main_signUp_page.dart'; + +class MainMainPage extends StatefulWidget { + const MainMainPage({Key? key}) : super(key: key); + + @override + State createState() => _MainMainPageState(); +} + +class _MainMainPageState extends State { + int index = 2; + + final screens = [ + MainHomePage(), + Draggable(child: Container(height: 200 , width: 300, color: Colors.grey,), feedback: Container(height: 200 , width: 300, color: Colors.black,)), + Spots(), + Center(child: Text('Tops'),), + Center(child: Text('Messages'),), + ]; + @override + Widget build(BuildContext context) { + return Scaffold( + body: screens[index], + bottomNavigationBar: NavigationBarTheme( + data: NavigationBarThemeData( + indicatorColor: Colors.deepPurple, + labelTextStyle: MaterialStateProperty.all( + TextStyle(fontSize: 12, fontWeight: FontWeight.w400, color: Colors.grey) + ), + ), + child: NavigationBar( + animationDuration: Duration(seconds: 1), + selectedIndex: index, + onDestinationSelected: (index) => + setState(() => this.index = index), + backgroundColor: Color(0xFF232123), + destinations: [ + NavigationDestination(icon: Icon(Icons.person_outline, color: Colors.grey,), label: 'Profil', selectedIcon: Icon(Icons.person, color: Colors.white,),), + NavigationDestination(icon: Icon(Icons.bookmark_border, color: Colors.grey,), selectedIcon: Icon(Icons.bookmark, color: Colors.white,), label: 'Discovery'), + NavigationDestination(icon: Icon(MyFlutterApp.Spots_outline, color: Colors.grey), selectedIcon: Icon(MyFlutterApp.Spots, color: Colors.white), label: 'Spots',), + NavigationDestination(icon: Icon(MyFlutterApp.podium_outine, color: Colors.grey,), label: 'Tops', selectedIcon: Icon(MyFlutterApp.podium, color: Colors.white,),), + NavigationDestination(icon: Icon(Icons.mail_outline, color: Colors.grey,), label: 'Messages', selectedIcon: Icon(Icons.email, color: Colors.white,),), + ], + ), + ), + ); + } +} diff --git a/daflmusic/lib/widgets/spots.dart b/daflmusic/lib/widgets/spots.dart new file mode 100644 index 0000000..85736ce --- /dev/null +++ b/daflmusic/lib/widgets/spots.dart @@ -0,0 +1,113 @@ +import 'package:daflmusic/dafl_card.dart'; +import 'package:flutter/cupertino.dart'; +import 'package:flutter/material.dart'; +import 'package:flutter_swipable/flutter_swipable.dart'; + +class Spots extends StatefulWidget { + const Spots({Key? key}) : super(key: key); + + @override + State createState() => _SpotsState(); +} + +class _SpotsState extends State { + + List pileCarte = [ + DaflCard(color: Colors.red), + DaflCard(color: Colors.red), + DaflCard(color: Colors.red), + DaflCard(color: Colors.red), + DaflCard(color: Colors.red), + DaflCard(color: Colors.red), + DaflCard(color: Colors.red), + DaflCard(color: Colors.red), + ]; + @override + Widget build(BuildContext context) { + return Scaffold( + resizeToAvoidBottomInset: false, + backgroundColor: Color(0xFF141414), + body: Stack( + children: [ + Image.asset( + 'assets/images/image_blur.png', + height: double.infinity, + width: double.infinity, + fit: BoxFit.cover, + ), + ListView( + children: [ + Container( + decoration: BoxDecoration( + image: DecorationImage( + image: AssetImage( + 'assets/images/pochette.png'), + fit: BoxFit.cover, + ), + borderRadius: BorderRadius.all(Radius.circular(20)) + ), + margin: EdgeInsets.fromLTRB(30, 87, 30, 0), + height: 565, + child: Stack(children: + pileCarte, + ), + ) , + Container( + margin: EdgeInsets.all(30), + height: 100, + color: Colors.blue, + ), + Container( + margin: EdgeInsets.fromLTRB(30, 10, 30, 0), + height: 100, + color: Colors.blue, + ), + Container( + margin: EdgeInsets.fromLTRB(30, 10, 30, 0), + height: 100, + color: Colors.blue, + ), + Container( + margin: EdgeInsets.fromLTRB(30, 10, 30, 0), + height: 100, + color: Colors.blue, + ), + Container( + margin: EdgeInsets.fromLTRB(30, 10, 30, 0), + height: 100, + color: Colors.blue, + ), + Container( + margin: EdgeInsets.fromLTRB(30, 10, 30, 0), + height: 100, + color: Colors.blue, + ), + ], + ), + Stack( + children: [ + Container(height: 200, + decoration: BoxDecoration( + gradient: LinearGradient( + colors: [Colors.black, Colors.transparent], + begin: Alignment.topCenter, + end: Alignment.bottomCenter, + ) + + ),), + Padding(padding: EdgeInsets.fromLTRB(20, 60, 0, 0), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Text('COULEURS',style: TextStyle(fontFamily: 'DMSans', color: Colors.white.withOpacity(1) ,fontSize: 20, fontWeight: FontWeight.w800),), + Text('Khali',style: TextStyle(fontFamily: 'DMSans', color: Colors.white.withOpacity(1) ,fontSize: 17, fontWeight: FontWeight.w200),), + ], + ),), + + ], + ), + ], + ), + ); + } +}