ajout fichier mal commit

Vues_lucas
Lucas Delanier 3 years ago
parent eb7a2772de
commit 1be4f14220

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.4 KiB

@ -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,),);
}
}

@ -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);
}

@ -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(),
);
}
}

@ -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<MainMainPage> createState() => _MainMainPageState();
}
class _MainMainPageState extends State<MainMainPage> {
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,),),
],
),
),
);
}
}

@ -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<Spots> createState() => _SpotsState();
}
class _SpotsState extends State<Spots> {
List<Widget> pileCarte = <Widget>[
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),),
],
),),
],
),
],
),
);
}
}
Loading…
Cancel
Save