Compare commits
12 Commits
master
...
Vues_lucas
Author | SHA1 | Date |
---|---|---|
![]() |
16bef4cc1f | 3 years ago |
![]() |
decb821421 | 3 years ago |
![]() |
ebdc9b3af7 | 3 years ago |
![]() |
d01ab8b2e1 | 3 years ago |
![]() |
6127ec88db | 3 years ago |
![]() |
1b8299b8f8 | 3 years ago |
![]() |
00d4e7607e | 3 years ago |
![]() |
1be4f14220 | 3 years ago |
![]() |
eb7a2772de | 3 years ago |
![]() |
184808eba7 | 3 years ago |
![]() |
419f936c41 | 3 years ago |
![]() |
951c6567ef | 3 years ago |
@ -0,0 +1,44 @@
|
||||
# Miscellaneous
|
||||
*.class
|
||||
*.log
|
||||
*.pyc
|
||||
*.swp
|
||||
.DS_Store
|
||||
.atom/
|
||||
.buildlog/
|
||||
.history
|
||||
.svn/
|
||||
migrate_working_dir/
|
||||
|
||||
# IntelliJ related
|
||||
*.iml
|
||||
*.ipr
|
||||
*.iws
|
||||
.idea/
|
||||
|
||||
# The .vscode folder contains launch configuration and tasks you configure in
|
||||
# VS Code which you may wish to be included in version control, so this line
|
||||
# is commented out by default.
|
||||
#.vscode/
|
||||
|
||||
# Flutter/Dart/Pub related
|
||||
**/doc/api/
|
||||
**/ios/Flutter/.last_build_id
|
||||
.dart_tool/
|
||||
.flutter-plugins
|
||||
.flutter-plugins-dependencies
|
||||
.packages
|
||||
.pub-cache/
|
||||
.pub/
|
||||
/build/
|
||||
|
||||
# Symbolication related
|
||||
app.*.symbols
|
||||
|
||||
# Obfuscation related
|
||||
app.*.map.json
|
||||
|
||||
# Android Studio will place build artifacts here
|
||||
/android/app/debug
|
||||
/android/app/profile
|
||||
/android/app/release
|
@ -0,0 +1,45 @@
|
||||
# This file tracks properties of this Flutter project.
|
||||
# Used by Flutter tool to assess capabilities and perform upgrades etc.
|
||||
#
|
||||
# This file should be version controlled.
|
||||
|
||||
version:
|
||||
revision: 18a827f3933c19f51862dde3fa472197683249d6
|
||||
channel: stable
|
||||
|
||||
project_type: app
|
||||
|
||||
# Tracks metadata for the flutter migrate command
|
||||
migration:
|
||||
platforms:
|
||||
- platform: root
|
||||
create_revision: 18a827f3933c19f51862dde3fa472197683249d6
|
||||
base_revision: 18a827f3933c19f51862dde3fa472197683249d6
|
||||
- platform: android
|
||||
create_revision: 18a827f3933c19f51862dde3fa472197683249d6
|
||||
base_revision: 18a827f3933c19f51862dde3fa472197683249d6
|
||||
- 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
|
||||
|
||||
# List of Local paths (relative to this file) that should be
|
||||
# ignored by the migrate tool.
|
||||
#
|
||||
# Files that are not part of the templates will be ignored by default.
|
||||
unmanaged_files:
|
||||
- 'lib/main.dart'
|
||||
- 'ios/Runner.xcodeproj/project.pbxproj'
|
@ -0,0 +1,29 @@
|
||||
# This file configures the analyzer, which statically analyzes Dart code to
|
||||
# check for errors, warnings, and lints.
|
||||
#
|
||||
# The issues identified by the analyzer are surfaced in the UI of Dart-enabled
|
||||
# IDEs (https://dart.dev/tools#ides-and-editors). The analyzer can also be
|
||||
# invoked from the command line by running `flutter analyze`.
|
||||
|
||||
# The following line activates a set of recommended lints for Flutter apps,
|
||||
# packages, and plugins designed to encourage good coding practices.
|
||||
include: package:flutter_lints/flutter.yaml
|
||||
|
||||
linter:
|
||||
# The lint rules applied to this project can be customized in the
|
||||
# section below to disable rules from the `package:flutter_lints/flutter.yaml`
|
||||
# included above or to enable additional rules. A list of all available lints
|
||||
# and their documentation is published at
|
||||
# https://dart-lang.github.io/linter/lints/index.html.
|
||||
#
|
||||
# Instead of disabling a lint rule for the entire project in the
|
||||
# section below, it can also be suppressed for a single line of code
|
||||
# or a specific dart file by using the `// ignore: name_of_lint` and
|
||||
# `// ignore_for_file: name_of_lint` syntax on the line or in the file
|
||||
# producing the lint.
|
||||
rules:
|
||||
# avoid_print: false # Uncomment to disable the `avoid_print` rule
|
||||
# prefer_single_quotes: true # Uncomment to enable the `prefer_single_quotes` rule
|
||||
|
||||
# Additional information about this file can be found at
|
||||
# https://dart.dev/guides/language/analysis-options
|
After Width: | Height: | Size: 21 KiB |
After Width: | Height: | Size: 19 KiB |
After Width: | Height: | Size: 104 KiB |
After Width: | Height: | Size: 1.5 KiB |
After Width: | Height: | Size: 7.0 MiB |
After Width: | Height: | Size: 5.4 MiB |
After Width: | Height: | Size: 2.8 KiB |
After Width: | Height: | Size: 2.8 KiB |
After Width: | Height: | Size: 3.6 KiB |
After Width: | Height: | Size: 723 KiB |
After Width: | Height: | Size: 2.8 KiB |
After Width: | Height: | Size: 1.1 KiB |
After Width: | Height: | Size: 5.8 KiB |
After Width: | Height: | Size: 1.9 KiB |
After Width: | Height: | Size: 1.3 KiB |
After Width: | Height: | Size: 248 KiB |
After Width: | Height: | Size: 960 B |
After Width: | Height: | Size: 1.7 MiB |
After Width: | Height: | Size: 1.1 KiB |
After Width: | Height: | Size: 568 B |
After Width: | Height: | Size: 2.4 KiB |
@ -0,0 +1,180 @@
|
||||
import 'package:flutter/cupertino.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:fluttericon/font_awesome5_icons.dart';
|
||||
import 'package:provider/provider.dart';
|
||||
|
||||
import '../main.dart';
|
||||
|
||||
class DiscoveryPage extends StatefulWidget {
|
||||
const DiscoveryPage({Key? key}) : super(key: key);
|
||||
|
||||
@override
|
||||
State<DiscoveryPage> createState() => _DiscoveryPageState();
|
||||
}
|
||||
|
||||
class _DiscoveryPageState extends State<DiscoveryPage> {
|
||||
|
||||
@override
|
||||
|
||||
Widget build(BuildContext context) {
|
||||
double height = MediaQuery.of(context).size.height;
|
||||
double width = MediaQuery.of(context).size.width;
|
||||
return Scaffold(
|
||||
backgroundColor: Color(0xFF141414),
|
||||
resizeToAvoidBottomInset: false,
|
||||
|
||||
body: Padding(padding: EdgeInsets.fromLTRB(30, 50, 30, 0),
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Container(
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Row(
|
||||
children: [
|
||||
Text('Playlist découverte', style: TextStyle(color: Colors.white, fontWeight: FontWeight.w500, fontSize: 25),),
|
||||
Spacer(),
|
||||
Icon(FontAwesome5.sort_amount_down, size: 30, color: Colors.white,),
|
||||
]
|
||||
),
|
||||
Padding(padding: EdgeInsets.fromLTRB(0, 5, 0, 0)),
|
||||
Text('Retrouvez ici vos nouvelles découvertes.', style: TextStyle(color: Colors.grey.withOpacity(0.4), fontSize: 15),),
|
||||
],
|
||||
),
|
||||
),
|
||||
Expanded(
|
||||
child: ListView(
|
||||
|
||||
children: [
|
||||
SizedBox(height: 40,),
|
||||
Container(
|
||||
margin: EdgeInsets.fromLTRB(0, 10, 0, 0),
|
||||
child: Column(
|
||||
children: [
|
||||
|
||||
Container(
|
||||
margin: EdgeInsets.fromLTRB(0, 5, 0, 0),
|
||||
width: double.infinity,
|
||||
child: Row(
|
||||
children: [
|
||||
Container(
|
||||
height: 60,
|
||||
width: 60,
|
||||
decoration: BoxDecoration(
|
||||
image: DecorationImage(
|
||||
image: NetworkImage('https://www.goutemesdisques.com/uploads/tx_gmdchron/pi1/L_Etrange_Histoire_de_Mr_Anderson.jpg'),
|
||||
fit: BoxFit.cover,
|
||||
),
|
||||
border: Border.all(width: 0, color: Colors.grey.withOpacity(0)),
|
||||
borderRadius: BorderRadius.all(Radius.circular(10)),
|
||||
),),
|
||||
Container(
|
||||
margin: EdgeInsets.fromLTRB(20, 0, 0, 0),
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
Text('IVERSON',style: TextStyle(fontFamily: 'DMSans', color: Colors.white.withOpacity(1) ,fontSize: 20, fontWeight: FontWeight.w800),),
|
||||
Text('Laylow',style: TextStyle(fontFamily: 'DMSans', color: Colors.white.withOpacity(0.6) ,fontSize: 16, fontWeight: FontWeight.w400),),
|
||||
|
||||
],
|
||||
),),
|
||||
],
|
||||
),
|
||||
),
|
||||
|
||||
|
||||
],
|
||||
)
|
||||
),
|
||||
Container(
|
||||
margin: EdgeInsets.fromLTRB(0, 10, 0, 0),
|
||||
child: Column(
|
||||
children: [
|
||||
|
||||
Container(
|
||||
margin: EdgeInsets.fromLTRB(0, 5, 0, 0),
|
||||
width: double.infinity,
|
||||
child: Row(
|
||||
children: [
|
||||
Container(
|
||||
height: 60,
|
||||
width: 60,
|
||||
decoration: BoxDecoration(
|
||||
image: DecorationImage(
|
||||
image: NetworkImage('https://www.goutemesdisques.com/uploads/tx_gmdchron/pi1/L_Etrange_Histoire_de_Mr_Anderson.jpg'),
|
||||
fit: BoxFit.cover,
|
||||
),
|
||||
border: Border.all(width: 0, color: Colors.grey.withOpacity(0)),
|
||||
borderRadius: BorderRadius.all(Radius.circular(10)),
|
||||
),),
|
||||
Container(
|
||||
margin: EdgeInsets.fromLTRB(20, 0, 0, 0),
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
Text('IVERSON',style: TextStyle(fontFamily: 'DMSans', color: Colors.white.withOpacity(1) ,fontSize: 20, fontWeight: FontWeight.w800),),
|
||||
Text('Laylow',style: TextStyle(fontFamily: 'DMSans', color: Colors.white.withOpacity(0.6) ,fontSize: 16, fontWeight: FontWeight.w400),),
|
||||
|
||||
],
|
||||
),),
|
||||
],
|
||||
),
|
||||
),
|
||||
|
||||
|
||||
],
|
||||
)
|
||||
),
|
||||
Container(
|
||||
margin: EdgeInsets.fromLTRB(0, 10, 0, 0),
|
||||
child: Column(
|
||||
children: [
|
||||
|
||||
Container(
|
||||
margin: EdgeInsets.fromLTRB(0, 5, 0, 0),
|
||||
width: double.infinity,
|
||||
child: Row(
|
||||
children: [
|
||||
Container(
|
||||
height: 60,
|
||||
width: 60,
|
||||
decoration: BoxDecoration(
|
||||
image: DecorationImage(
|
||||
image: NetworkImage('https://www.goutemesdisques.com/uploads/tx_gmdchron/pi1/L_Etrange_Histoire_de_Mr_Anderson.jpg'),
|
||||
fit: BoxFit.cover,
|
||||
),
|
||||
border: Border.all(width: 0, color: Colors.grey.withOpacity(0)),
|
||||
borderRadius: BorderRadius.all(Radius.circular(10)),
|
||||
),),
|
||||
Container(
|
||||
margin: EdgeInsets.fromLTRB(20, 0, 0, 0),
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
Text('IVERSON',style: TextStyle(fontFamily: 'DMSans', color: Colors.white.withOpacity(1) ,fontSize: 20, fontWeight: FontWeight.w800),),
|
||||
Text('Laylow',style: TextStyle(fontFamily: 'DMSans', color: Colors.white.withOpacity(0.6) ,fontSize: 16, fontWeight: FontWeight.w400),),
|
||||
|
||||
],
|
||||
),),
|
||||
],
|
||||
),
|
||||
),
|
||||
|
||||
|
||||
],
|
||||
)
|
||||
),
|
||||
|
||||
|
||||
],
|
||||
),
|
||||
),
|
||||
],
|
||||
),),
|
||||
);
|
||||
}
|
||||
}
|
@ -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,247 @@
|
||||
import 'dart:async';
|
||||
import 'dart:math';
|
||||
|
||||
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';
|
||||
import 'package:fluttertoast/fluttertoast.dart';
|
||||
import 'package:provider/provider.dart';
|
||||
import 'package:rive/rive.dart';
|
||||
|
||||
|
||||
void main() {
|
||||
runApp(MyApp());
|
||||
}
|
||||
|
||||
class MyApp extends StatelessWidget {
|
||||
|
||||
|
||||
// This widget is the root of your application.
|
||||
@override
|
||||
Widget build(BuildContext context){
|
||||
SystemChrome.setEnabledSystemUIMode(SystemUiMode.immersiveSticky);
|
||||
return ChangeNotifierProvider(
|
||||
create: (context) => CardProvider(),
|
||||
child: MaterialApp(
|
||||
debugShowCheckedModeBanner: false,
|
||||
title: 'Flutter Demo',
|
||||
home: MainHomePage(),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
enum CardStatus { like, disLike, discovery}
|
||||
|
||||
class CardProvider extends ChangeNotifier{
|
||||
List<String> _urlImages = [];
|
||||
bool _isDragging = false;
|
||||
double _angle = 0;
|
||||
Offset _position = Offset.zero;
|
||||
Size _screenSize = Size.zero;
|
||||
|
||||
List<String> get urlImages => _urlImages;
|
||||
bool get isDragging => _isDragging;
|
||||
Offset get position => _position;
|
||||
double get angle => _angle;
|
||||
|
||||
CardProvider() {
|
||||
resetUsers();
|
||||
}
|
||||
|
||||
void resetUsers() {
|
||||
_urlImages = <String>[
|
||||
'https://khaligidilit.com/assets/images/cover-LAI%CC%88LA-Khali.jpeg',
|
||||
'https://m.media-amazon.com/images/I/61aUOMzwS8L._SL1440_.jpg',
|
||||
'https://pbs.twimg.com/media/ExJ-My-XMAE3Ko2.jpg',
|
||||
'https://cdns-images.dzcdn.net/images/cover/2818a661c6d533155ce6dffc256b1f51/500x500.jpg',
|
||||
'https://cdns-images.dzcdn.net/images/cover/b351f0e935c9c3901f8d893b92ab952a/500x500.jpg',
|
||||
'https://cdns-images.dzcdn.net/images/cover/65147b581f2ace9e0f0723ee76e70fda/500x500.jpg',
|
||||
'https://cdns-images.dzcdn.net/images/cover/173b96be8ac025fb9578b0139010bc80/500x500.jpg',
|
||||
'https://cdns-images.dzcdn.net/images/cover/17a9747927ac3e5ea56f92f635d9180c/500x500.jpg',
|
||||
].reversed.toList();
|
||||
|
||||
notifyListeners();
|
||||
}
|
||||
|
||||
|
||||
void setScreenSize(Size screenSize) => _screenSize = screenSize;
|
||||
|
||||
void startPosition(DragStartDetails details) {
|
||||
_isDragging = true;
|
||||
|
||||
notifyListeners();
|
||||
}
|
||||
|
||||
void updatePosition(DragUpdateDetails details) {
|
||||
_position += details.delta;
|
||||
|
||||
final x = _position.dx;
|
||||
_angle = 45 * x / _screenSize.width;
|
||||
notifyListeners();
|
||||
}
|
||||
|
||||
void endPosition() {
|
||||
_isDragging = false;
|
||||
notifyListeners();
|
||||
|
||||
final status = getStatus(force: true);
|
||||
|
||||
|
||||
switch (status) {
|
||||
case CardStatus.like:
|
||||
like();
|
||||
break;
|
||||
case CardStatus.disLike:
|
||||
dislike();
|
||||
break;
|
||||
case CardStatus.discovery:
|
||||
discovery();
|
||||
break;
|
||||
default:
|
||||
resetPosition();
|
||||
}
|
||||
}
|
||||
void resetPosition() {
|
||||
_isDragging = false;
|
||||
_position = Offset.zero;
|
||||
_angle = 0;
|
||||
|
||||
notifyListeners();
|
||||
}
|
||||
|
||||
double getStatusOpacity() {
|
||||
final delta = 100;
|
||||
final pos = max(_position.dx.abs(), _position.dy.abs());
|
||||
final opacity = pos / delta;
|
||||
|
||||
return min(opacity, 1);
|
||||
}
|
||||
|
||||
CardStatus? getStatus({bool force = false}) {
|
||||
final x = _position.dx;
|
||||
final y = _position.dy;
|
||||
final forceDiscovery = x.abs() < 20;
|
||||
|
||||
if(force) {
|
||||
final delta = 100;
|
||||
|
||||
if (x >= delta) {
|
||||
return CardStatus.like;
|
||||
} else if ( x <= -delta){
|
||||
return CardStatus.disLike;
|
||||
} else if ( y <= -delta / 2 && forceDiscovery){
|
||||
return CardStatus.discovery;
|
||||
}
|
||||
} else{
|
||||
final delta = 20;
|
||||
|
||||
if(y <= -delta * 2 && forceDiscovery) {
|
||||
return CardStatus.discovery;
|
||||
} else if ( x >= delta) {
|
||||
return CardStatus.like;
|
||||
} else if ( x <= -delta) {
|
||||
return CardStatus.disLike;
|
||||
}
|
||||
}
|
||||
}
|
||||
void dislike() {
|
||||
print("dislike");
|
||||
_angle = -20;
|
||||
_position -= Offset(2 * _screenSize.width, 0);
|
||||
_nextCard();
|
||||
|
||||
notifyListeners();
|
||||
}
|
||||
|
||||
void discovery() {
|
||||
print("discovery");
|
||||
_angle = 0;
|
||||
_position -= Offset(0, _screenSize.height);
|
||||
_discovery_card();
|
||||
Fluttertoast.showToast(
|
||||
msg: 'Ajouté',
|
||||
toastLength: Toast.LENGTH_SHORT,
|
||||
gravity: ToastGravity.TOP,
|
||||
timeInSecForIosWeb: 2,
|
||||
backgroundColor: Colors.deepPurple,
|
||||
textColor: Colors.white
|
||||
);
|
||||
|
||||
notifyListeners();
|
||||
}
|
||||
|
||||
void like() {
|
||||
print("like");
|
||||
_angle = 20;
|
||||
_position += Offset(2 * _screenSize.width, 0);
|
||||
_nextCard();
|
||||
|
||||
notifyListeners();
|
||||
}
|
||||
|
||||
Future _nextCard() async {
|
||||
if ( _urlImages.isEmpty) return;
|
||||
|
||||
await Future.delayed(Duration(milliseconds: 200));
|
||||
_urlImages.removeLast();
|
||||
resetPosition();
|
||||
}
|
||||
|
||||
Future _discovery_card() async {
|
||||
await Future.delayed(Duration(milliseconds: 200));
|
||||
resetPosition();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
class Splash extends StatefulWidget {
|
||||
const Splash({Key? key}) : super(key: key);
|
||||
|
||||
@override
|
||||
State<Splash> createState() => _SplashState();
|
||||
}
|
||||
|
||||
class _SplashState extends State<Splash> {
|
||||
|
||||
@override
|
||||
void initState() {
|
||||
// TODO: implement initState
|
||||
super.initState();
|
||||
WidgetsBinding.instance.addPostFrameCallback((timeStamp) {
|
||||
Timer(Duration(seconds: 2), () {
|
||||
Navigator.pushReplacement(context,
|
||||
MaterialPageRoute(builder:
|
||||
(context) =>MainMainPage()
|
||||
)
|
||||
);
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Scaffold(
|
||||
backgroundColor: Color(0xFF141414),
|
||||
body: Center(
|
||||
child: Column(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
Container(
|
||||
height: 300,
|
||||
width: 300,
|
||||
child: RiveAnimation.asset('assets/images/new_file (2).riv'),
|
||||
),
|
||||
SizedBox(height: 50),
|
||||
],
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
@ -0,0 +1,70 @@
|
||||
|
||||
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';
|
||||
|
||||
import '../discoveryPage/discoveryPage.dart';
|
||||
import '../profilPage/MainProfilPage.dart';
|
||||
import '../profilPage/parametre_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;
|
||||
int get index => _index;
|
||||
final screens = [
|
||||
MainProfilPage(),
|
||||
DiscoveryPage(),
|
||||
Spots(),
|
||||
Center(child: Text('Tops'),),
|
||||
Center(child: Text('Messages'),),
|
||||
ParametrePage(),
|
||||
];
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
double height = MediaQuery.of(context).size.height;
|
||||
return Scaffold(
|
||||
body: screens[_index],
|
||||
bottomNavigationBar: NavigationBarTheme(
|
||||
data: NavigationBarThemeData(
|
||||
indicatorColor: Color(0xFF5C1DC3),
|
||||
labelTextStyle: MaterialStateProperty.all(
|
||||
TextStyle(fontSize: 12, fontWeight: FontWeight.w400, color: Colors.grey)
|
||||
),
|
||||
),
|
||||
child: ConstrainedBox(
|
||||
constraints: BoxConstraints(
|
||||
minHeight: height*0.1,
|
||||
maxHeight: 100,
|
||||
),
|
||||
child: NavigationBar(
|
||||
animationDuration: Duration(seconds: 1),
|
||||
selectedIndex: index,
|
||||
height: height*0.1,
|
||||
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,220 @@
|
||||
|
||||
import 'package:daflmusic/profilPage/parametre_page.dart';
|
||||
import 'package:flutter/cupertino.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:page_transition/page_transition.dart';
|
||||
|
||||
import '../icons.dart';
|
||||
import '../widgets/spots.dart';
|
||||
|
||||
class MainProfilPage extends StatefulWidget {
|
||||
const MainProfilPage({Key? key}) : super(key: key);
|
||||
|
||||
@override
|
||||
State<MainProfilPage> createState() => _MainProfilPageState();
|
||||
}
|
||||
|
||||
class _MainProfilPageState extends State<MainProfilPage> {
|
||||
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
double height = MediaQuery.of(context).size.height;
|
||||
double width = MediaQuery.of(context).size.width;
|
||||
|
||||
return Container(
|
||||
color: Color(0xFF141414),
|
||||
child: Container(
|
||||
width: double.infinity,
|
||||
height: double.infinity,
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.center,
|
||||
children: [
|
||||
Container(
|
||||
width: double.infinity,
|
||||
margin: EdgeInsets.fromLTRB(30, 50, 0, 0),
|
||||
child: Text(
|
||||
"Profil",
|
||||
style: TextStyle(fontSize: 25, fontWeight: FontWeight.w600, color: Colors.white),),
|
||||
),
|
||||
Container(
|
||||
margin: EdgeInsets.fromLTRB(0, 10, 0, 40),
|
||||
height: height*0.14,
|
||||
width: height*0.14,
|
||||
decoration: BoxDecoration(
|
||||
borderRadius: BorderRadius.circular(100.0),
|
||||
color: Colors.blue,border: Border.all(width: 6.0, color: Colors.white),
|
||||
|
||||
),
|
||||
),
|
||||
Container(
|
||||
height: 55,
|
||||
width: double.infinity,
|
||||
decoration: BoxDecoration(
|
||||
borderRadius: BorderRadius.circular(10.0),
|
||||
color: Colors.transparent,
|
||||
),
|
||||
margin: EdgeInsets.fromLTRB(30, 0, 30, 0),
|
||||
child: SizedBox(
|
||||
height: 55,
|
||||
width: double.infinity,
|
||||
child: ElevatedButton(
|
||||
style: ElevatedButton.styleFrom(
|
||||
backgroundColor: Color(0xFFD9D9D9).withOpacity(0.08),
|
||||
shape: RoundedRectangleBorder(
|
||||
borderRadius: BorderRadius.circular(10.0),
|
||||
),// background// foreground
|
||||
),
|
||||
onPressed: () {
|
||||
},
|
||||
child: Row(
|
||||
children: [
|
||||
Image.asset('assets/images/fav_logo.png', height: 25,),
|
||||
SizedBox(width: 12,),
|
||||
Text("Préférences musicales",
|
||||
style: TextStyle(color: Colors.white ,fontSize: 17, fontWeight: FontWeight.w400),
|
||||
textAlign: TextAlign.center,
|
||||
),
|
||||
Spacer(),
|
||||
Icon(Icons.arrow_forward_ios, color: Colors.white.withOpacity(0.3),),
|
||||
],
|
||||
)
|
||||
),),
|
||||
),
|
||||
Container(
|
||||
height: 55,
|
||||
width: double.infinity,
|
||||
decoration: BoxDecoration(
|
||||
borderRadius: BorderRadius.circular(10.0),
|
||||
color: Colors.transparent,
|
||||
),
|
||||
margin: EdgeInsets.fromLTRB(30, 10, 30, 0),
|
||||
child: SizedBox(
|
||||
height: 55,
|
||||
width: double.infinity,
|
||||
child: ElevatedButton(
|
||||
style: ElevatedButton.styleFrom(
|
||||
backgroundColor: Color(0xFFD9D9D9).withOpacity(0.08),
|
||||
shape: RoundedRectangleBorder(
|
||||
borderRadius: BorderRadius.circular(10.0),
|
||||
),// background// foreground
|
||||
),
|
||||
onPressed: () {
|
||||
Navigator.push(context,MaterialPageRoute(builder: (context)=> Destination()));
|
||||
},
|
||||
child: Row(
|
||||
children: [
|
||||
Icon(Icons.remove_red_eye, color: Colors.white,size: 30,),
|
||||
SizedBox(width: 12,),
|
||||
Text("Aperçu de mon profil",
|
||||
style: TextStyle(color: Colors.white ,fontSize: 17, fontWeight: FontWeight.w400),
|
||||
textAlign: TextAlign.center,
|
||||
),
|
||||
Spacer(),
|
||||
Icon(Icons.arrow_forward_ios, color: Colors.white.withOpacity(0.3),),
|
||||
],
|
||||
)
|
||||
),),
|
||||
),
|
||||
Container(
|
||||
height: height*0.27,
|
||||
width: double.infinity,
|
||||
margin: EdgeInsets.fromLTRB(30, 15, 30, 0),
|
||||
child: Column(
|
||||
children: [
|
||||
Row(
|
||||
mainAxisAlignment: MainAxisAlignment.start,
|
||||
crossAxisAlignment: CrossAxisAlignment.center,
|
||||
children: [
|
||||
Icon(Icons.wifi_tethering, color: Colors.white, size: 35,),
|
||||
SizedBox(width: 10,),
|
||||
Text("En cours d'écoute...",
|
||||
style: TextStyle(color: Colors.white ,fontSize: 17, fontWeight: FontWeight.w400),
|
||||
textAlign: TextAlign.center,
|
||||
),
|
||||
],
|
||||
),
|
||||
Container(
|
||||
margin: EdgeInsets.fromLTRB(0, 10, 0, 0),
|
||||
height: height*0.14,
|
||||
decoration: BoxDecoration(
|
||||
borderRadius: BorderRadius.circular(15.0),
|
||||
color: Color(0xFFD9D9D9).withOpacity(0.08),
|
||||
),
|
||||
child:
|
||||
Row(
|
||||
mainAxisAlignment: MainAxisAlignment.start,
|
||||
crossAxisAlignment: CrossAxisAlignment.center,
|
||||
children: [
|
||||
Container(
|
||||
margin: EdgeInsets.fromLTRB(15, 0, 0, 0),
|
||||
child: ClipRRect(
|
||||
borderRadius: BorderRadius.circular(15),
|
||||
child: Image(
|
||||
height: 90,
|
||||
width: 90,
|
||||
image: NetworkImage(
|
||||
'https://images.genius.com/ef4849be3da5fdb22ea9e656679be3a3.600x600x1.jpg'),
|
||||
),
|
||||
),
|
||||
),
|
||||
Container(
|
||||
margin: EdgeInsets.fromLTRB(12, 20, 0, 0),
|
||||
child: Column(
|
||||
mainAxisAlignment: MainAxisAlignment.start,
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Text('BAMBINA', style: TextStyle(fontSize:18, fontWeight: FontWeight.w500, color: Colors.white),),
|
||||
Text('PNL', style: TextStyle(fontSize:16, fontWeight: FontWeight.w400, color: Colors.grey),),
|
||||
],
|
||||
),
|
||||
)
|
||||
|
||||
],
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
Spacer(),
|
||||
Container(
|
||||
height: 55,
|
||||
width: double.infinity,
|
||||
decoration: BoxDecoration(
|
||||
borderRadius: BorderRadius.circular(10.0),
|
||||
color: Colors.transparent,
|
||||
),
|
||||
margin: EdgeInsets.fromLTRB(30, 0, 30, height*0.04),
|
||||
child: SizedBox(
|
||||
height: 55,
|
||||
width: double.infinity,
|
||||
child: ElevatedButton(
|
||||
style: ElevatedButton.styleFrom(
|
||||
backgroundColor: Color(0xFFD9D9D9).withOpacity(0.08),
|
||||
shape: RoundedRectangleBorder(
|
||||
borderRadius: BorderRadius.circular(10.0),
|
||||
),// background// foreground
|
||||
),
|
||||
onPressed: () {
|
||||
Navigator.push(context,MaterialPageRoute(builder: (context)=> ParametrePage()));
|
||||
},
|
||||
child: Row(
|
||||
children: [
|
||||
Icon(Icons.settings, color: Colors.white,size: 30,),
|
||||
SizedBox(width: 12,),
|
||||
Text("Paramètres",
|
||||
style: TextStyle(color: Colors.white ,fontSize: 17, fontWeight: FontWeight.w400),
|
||||
textAlign: TextAlign.center,
|
||||
),
|
||||
Spacer(),
|
||||
Icon(Icons.arrow_forward_ios, color: Colors.white.withOpacity(0.3),),
|
||||
],
|
||||
)
|
||||
),),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
@ -0,0 +1,133 @@
|
||||
import 'package:daflmusic/mainPage/main_mainpage.dart';
|
||||
import 'package:flutter/cupertino.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
class ParametrePage extends StatefulWidget {
|
||||
const ParametrePage({Key? key}) : super(key: key);
|
||||
|
||||
@override
|
||||
State<ParametrePage> createState() => _ParametrePageState();
|
||||
}
|
||||
|
||||
class _ParametrePageState extends State<ParametrePage> {
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
double height = MediaQuery.of(context).size.height;
|
||||
double width = MediaQuery.of(context).size.width;
|
||||
return Scaffold(
|
||||
backgroundColor: Color(0xFF141414),
|
||||
resizeToAvoidBottomInset: false,
|
||||
appBar: AppBar(
|
||||
leading: new IconButton(
|
||||
icon: new Icon(Icons.keyboard_arrow_left, color: Colors.grey.withOpacity(0.7), size: 50,),
|
||||
onPressed: () => {Navigator.of(context).pop()},
|
||||
),
|
||||
backgroundColor: Colors.transparent,
|
||||
elevation: 0,
|
||||
),
|
||||
body: Container(
|
||||
width: double.infinity,
|
||||
height: double.infinity,
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.center,
|
||||
children: [
|
||||
Container(
|
||||
margin: EdgeInsets.fromLTRB(30, height*0.07, 30, 0),
|
||||
width: double.infinity,
|
||||
height: 30,
|
||||
alignment: Alignment.centerLeft,
|
||||
decoration: BoxDecoration(
|
||||
color: Color(0xFFD9D9D9).withOpacity(0.16),
|
||||
borderRadius: BorderRadius.circular(7.0),
|
||||
),
|
||||
child: Padding(
|
||||
padding: EdgeInsets.fromLTRB(20, 0, 0, 0),
|
||||
child: Text('Pseudo',
|
||||
style: TextStyle(
|
||||
color: Color(0xFFAEAEAE)
|
||||
),),
|
||||
)
|
||||
),
|
||||
Padding(padding: EdgeInsets.fromLTRB(30, 0, 30, 0),
|
||||
child: SizedBox(
|
||||
width: width,
|
||||
child: Row(
|
||||
children: [
|
||||
SizedBox(
|
||||
width: 230,
|
||||
child: TextField(
|
||||
style: TextStyle(color: Colors.white),
|
||||
decoration: InputDecoration(
|
||||
hintStyle: Theme.of(context).textTheme.caption?.copyWith(
|
||||
color: Colors.white,
|
||||
),
|
||||
border: InputBorder.none,
|
||||
hintText: 'Pseudonyme',
|
||||
),
|
||||
cursorColor: Colors.purple,
|
||||
textAlign: TextAlign.left,
|
||||
),
|
||||
),
|
||||
Spacer(),
|
||||
Padding(padding: EdgeInsets.fromLTRB(0, 0, 20, 0),
|
||||
child: Text('modifier',
|
||||
style: TextStyle( color: Colors.blue, fontSize: 17),),),
|
||||
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
Container(
|
||||
margin: EdgeInsets.fromLTRB(30, 0, 30, 0),
|
||||
width: double.infinity,
|
||||
height: 30,
|
||||
alignment: Alignment.centerLeft,
|
||||
decoration: BoxDecoration(
|
||||
color: Color(0xFFD9D9D9).withOpacity(0.16),
|
||||
borderRadius: BorderRadius.circular(7.0),
|
||||
),
|
||||
child: Padding(
|
||||
padding: EdgeInsets.fromLTRB(20, 0, 0, 0),
|
||||
child: Text('Mot de passe',
|
||||
style: TextStyle(
|
||||
color: Color(0xFFAEAEAE)
|
||||
),),
|
||||
)
|
||||
),
|
||||
Padding(padding: EdgeInsets.fromLTRB(30, 0, 30, 0),
|
||||
child: SizedBox(
|
||||
width: width,
|
||||
child: Row(
|
||||
children: [
|
||||
SizedBox(
|
||||
width: 230,
|
||||
child: TextField(
|
||||
obscureText: true,
|
||||
style: TextStyle(color: Colors.white),
|
||||
decoration: InputDecoration(
|
||||
hintStyle: Theme.of(context).textTheme.caption?.copyWith(
|
||||
color: Colors.white,
|
||||
),
|
||||
border: InputBorder.none,
|
||||
hintText: 'Mot de passe',
|
||||
),
|
||||
cursorColor: Colors.purple,
|
||||
textAlign: TextAlign.left,
|
||||
),
|
||||
),
|
||||
Spacer(),
|
||||
Padding(padding: EdgeInsets.fromLTRB(0, 0, 20, 0),
|
||||
child: Text('modifier',
|
||||
style: TextStyle( color: Colors.blue, fontSize: 17),),),
|
||||
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
|
||||
],
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
@ -0,0 +1,158 @@
|
||||
import 'dart:math';
|
||||
|
||||
import 'package:daflmusic/main.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:provider/provider.dart';
|
||||
class User{
|
||||
final String chanteur;
|
||||
final String titre;
|
||||
final String urlImage;
|
||||
|
||||
const User({
|
||||
required this.chanteur,
|
||||
required this.titre,
|
||||
required this.urlImage,
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
|
||||
class DaflCard extends StatefulWidget {
|
||||
final String urlImage;
|
||||
final bool isFront;
|
||||
|
||||
const DaflCard({
|
||||
Key? key,
|
||||
required this.urlImage,
|
||||
required this.isFront,
|
||||
}) : super(key: key);
|
||||
|
||||
@override
|
||||
State<DaflCard> createState() => _DaflCardState();
|
||||
}
|
||||
class _DaflCardState extends State<DaflCard>{
|
||||
@override
|
||||
void initState() {
|
||||
super.initState();
|
||||
|
||||
WidgetsBinding.instance!.addPostFrameCallback((_) {
|
||||
final size = MediaQuery.of(context).size;
|
||||
|
||||
final provider = Provider.of<CardProvider>(context, listen: false);
|
||||
provider.setScreenSize(size);
|
||||
});
|
||||
}
|
||||
@override
|
||||
Widget build(BuildContext context) => SizedBox.expand(
|
||||
child: widget.isFront ? buildFrontCard() : buildCard(),
|
||||
);
|
||||
|
||||
Widget buildCard() => ClipRRect(
|
||||
borderRadius: BorderRadius.circular(20),
|
||||
child: Container(
|
||||
decoration: BoxDecoration(
|
||||
image: DecorationImage(
|
||||
image: NetworkImage(widget.urlImage),
|
||||
fit: BoxFit.cover,
|
||||
alignment: Alignment(0,0),
|
||||
),
|
||||
|
||||
borderRadius: BorderRadius.all(Radius.circular(20))
|
||||
),
|
||||
),
|
||||
);
|
||||
|
||||
Widget buildStamps() {
|
||||
final provider = Provider.of<CardProvider>(context);
|
||||
final status = provider.getStatus();
|
||||
final opacity = provider.getStatusOpacity();
|
||||
|
||||
switch (status) {
|
||||
case CardStatus.like:
|
||||
final child = buildStamp(image: 'assets/images/icon_like.png', opacity: opacity);
|
||||
return child;
|
||||
case CardStatus.disLike:
|
||||
final child = buildStamp(image: 'assets/images/icon_dislike.png', opacity: opacity);
|
||||
return child;
|
||||
case CardStatus.discovery:
|
||||
final child = buildStamp(image: 'assets/images/icon_discovery.png', opacity: opacity);
|
||||
return child;
|
||||
default:
|
||||
return Container();
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
Widget buildStamp({
|
||||
double angle = 0,
|
||||
required String image,
|
||||
required double opacity,
|
||||
}) {
|
||||
return Opacity(opacity: opacity,
|
||||
child: ClipRRect(
|
||||
borderRadius: BorderRadius.circular(20),
|
||||
child: Container(
|
||||
decoration: BoxDecoration(
|
||||
color: Colors.black.withOpacity(0.75),
|
||||
border: Border.all(color: Color(0xFF3F1DC3), width: 6),
|
||||
|
||||
borderRadius: BorderRadius.all(Radius.circular(20))
|
||||
),
|
||||
child: Center(
|
||||
child: Image.asset(
|
||||
image,
|
||||
width: 100,
|
||||
),
|
||||
|
||||
),
|
||||
),
|
||||
),);
|
||||
}
|
||||
|
||||
Widget buildFrontCard() => GestureDetector(
|
||||
child: LayoutBuilder(
|
||||
builder: (context, constraints) {
|
||||
final provider = Provider.of<CardProvider>(context);
|
||||
final position = provider.position;
|
||||
final milliseconds = provider.isDragging ? 0 : 400;
|
||||
|
||||
final center = constraints.smallest.center(Offset.zero);
|
||||
final angle = provider.angle * pi / 180;
|
||||
final rotatedMatrix = Matrix4.identity()
|
||||
..translate(center.dx, center.dy)
|
||||
..rotateZ(angle)
|
||||
..translate(-center.dx, -center.dy);
|
||||
|
||||
return AnimatedContainer(
|
||||
curve: Curves.easeInOut,
|
||||
duration: Duration(milliseconds: milliseconds),
|
||||
transform: rotatedMatrix..translate(position.dx, position.dy),
|
||||
child: Stack(
|
||||
children: [
|
||||
buildCard(),
|
||||
buildStamps(),
|
||||
],
|
||||
),
|
||||
);
|
||||
},
|
||||
),
|
||||
onPanStart: (details) {
|
||||
final provider = Provider.of<CardProvider>(context, listen: false);
|
||||
|
||||
provider.startPosition(details);
|
||||
},
|
||||
onPanUpdate: (details) {
|
||||
final provider = Provider.of<CardProvider>(context, listen: false);
|
||||
|
||||
provider.updatePosition(details);
|
||||
},
|
||||
onPanEnd: (details) {
|
||||
final provider = Provider.of<CardProvider>(context, listen: false);
|
||||
|
||||
provider.endPosition();
|
||||
},
|
||||
|
||||
|
||||
|
||||
);
|
||||
}
|
@ -0,0 +1,686 @@
|
||||
import 'dart:ui';
|
||||
|
||||
import 'package:animations/animations.dart';
|
||||
import 'package:daflmusic/homePage/main_homepage.dart';
|
||||
import 'package:daflmusic/main.dart';
|
||||
import 'package:daflmusic/mainPage/main_mainpage.dart';
|
||||
import 'package:daflmusic/widgets/DaflCard.dart';
|
||||
import 'package:flutter/cupertino.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:provider/provider.dart';
|
||||
import 'package:fluttertoast/fluttertoast.dart';
|
||||
import 'package:rive/rive.dart';
|
||||
import 'package:flutter/src/painting/gradient.dart' as gradiant;
|
||||
|
||||
|
||||
class Spots extends StatefulWidget {
|
||||
const Spots({Key? key}) : super(key: key);
|
||||
|
||||
@override
|
||||
State<Spots> createState() => _SpotsState();
|
||||
}
|
||||
|
||||
class _SpotsState extends State<Spots> {
|
||||
|
||||
final user = User(
|
||||
chanteur: 'Khali',
|
||||
titre: 'COULEURS',
|
||||
urlImage: 'https://khaligidilit.com/assets/images/cover-LAI%CC%88LA-Khali.jpeg',
|
||||
);
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
double height = MediaQuery.of(context).size.height;
|
||||
double width = MediaQuery.of(context).size.width;
|
||||
final provider = Provider.of<CardProvider>(context);
|
||||
return Scaffold(
|
||||
|
||||
resizeToAvoidBottomInset: false,
|
||||
backgroundColor: Color(0xFF141414),
|
||||
body: Container(
|
||||
height: double.maxFinite,
|
||||
child: Stack(
|
||||
children: [
|
||||
Transform.scale(scale: 1.1,
|
||||
child: Container(
|
||||
decoration: BoxDecoration(
|
||||
image: DecorationImage(
|
||||
image: NetworkImage(provider.urlImages.isEmpty != true
|
||||
?provider.urlImages.last
|
||||
:"https://i.imgur.com/Uovh293.png"),
|
||||
fit: BoxFit.cover,
|
||||
|
||||
),
|
||||
),
|
||||
child: BackdropFilter(filter: ImageFilter.blur(sigmaX: 20.0, sigmaY: 20.0),
|
||||
child: Container(
|
||||
decoration: BoxDecoration(color: Colors.black.withOpacity(0.4)),
|
||||
),),
|
||||
),),
|
||||
Padding(
|
||||
padding: EdgeInsets.fromLTRB(0, 0, 0,height*0.03),
|
||||
child: Align(
|
||||
alignment: FractionalOffset.bottomCenter,
|
||||
child: OpenContainer(
|
||||
|
||||
closedColor: Colors.transparent,
|
||||
closedElevation: 0,
|
||||
transitionDuration: Duration(milliseconds: 400),
|
||||
closedBuilder: (context, openWidget){
|
||||
return PreviewInfo();
|
||||
},
|
||||
openBuilder: (context, closeWidget){
|
||||
return Destination();
|
||||
},
|
||||
),
|
||||
),
|
||||
),
|
||||
Center(
|
||||
child: Container(
|
||||
width: 300,
|
||||
height: 300,
|
||||
child: RiveAnimation.asset('assets/images/search_spot_animation.riv'),
|
||||
),
|
||||
),
|
||||
Positioned(
|
||||
top: height*0.68,
|
||||
width: width,
|
||||
child: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
GestureDetector(
|
||||
onTap: () {
|
||||
final provider = Provider.of<CardProvider>(context, listen: false);
|
||||
provider.dislike();
|
||||
|
||||
},
|
||||
child: Image.asset(
|
||||
'assets/images/bouton_dislike.png',
|
||||
height: 70,
|
||||
width: 70,
|
||||
fit: BoxFit.cover,
|
||||
),
|
||||
),
|
||||
SizedBox(
|
||||
width: width*0.1,
|
||||
),
|
||||
GestureDetector(
|
||||
onTap: () {
|
||||
final provider = Provider.of<CardProvider>(context, listen: false);
|
||||
provider.discovery();
|
||||
},
|
||||
child: Image.asset(
|
||||
'assets/images/bouton_discovery.png',
|
||||
height: 70,
|
||||
width: 70,
|
||||
fit: BoxFit.cover,
|
||||
),
|
||||
),
|
||||
SizedBox(
|
||||
width: width*0.1,
|
||||
),
|
||||
GestureDetector(
|
||||
onTap: () {
|
||||
final provider = Provider.of<CardProvider>(context, listen: false);
|
||||
provider.like();
|
||||
},
|
||||
child: Image.asset(
|
||||
'assets/images/bouton_like.png',
|
||||
height: 70,
|
||||
width: 70,
|
||||
fit: BoxFit.cover,
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
Align(
|
||||
child:Container(
|
||||
width: 400,
|
||||
height: height*0.8,
|
||||
margin: EdgeInsets.fromLTRB(width*0.09,height/5,width*0.09,height/3.7),
|
||||
|
||||
child: Container(
|
||||
child: buildCards(),
|
||||
)
|
||||
) ,
|
||||
),
|
||||
IgnorePointer(child: Container(height: 200,
|
||||
decoration: BoxDecoration(
|
||||
gradient: gradiant.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),),
|
||||
],
|
||||
),),
|
||||
],
|
||||
),
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
Widget buildCards() {
|
||||
final provider = Provider.of<CardProvider>(context);
|
||||
final urlImages = provider.urlImages;
|
||||
|
||||
return Stack(
|
||||
children: urlImages
|
||||
.map((urlImage) => DaflCard(
|
||||
urlImage: urlImage,
|
||||
isFront: urlImages.last == urlImage,
|
||||
))
|
||||
.toList(),
|
||||
);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
class Destination extends StatelessWidget{
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Scaffold(
|
||||
backgroundColor: Color(0xFF232123),
|
||||
appBar: AppBar(
|
||||
elevation: 0,
|
||||
backgroundColor: Colors.transparent,
|
||||
title: Text("J'aime aussi..."),
|
||||
),
|
||||
body: ListView(
|
||||
children: [
|
||||
Container(
|
||||
margin: EdgeInsets.fromLTRB(30, 10, 30, 0),
|
||||
child: Column(
|
||||
children: [
|
||||
Text('Pour mon mariage',style: TextStyle(fontFamily: 'DMSans', color: Colors.white.withOpacity(1) ,fontSize: 20, fontWeight: FontWeight.w800),),
|
||||
|
||||
Container(
|
||||
margin: EdgeInsets.fromLTRB(0, 10, 0, 0),
|
||||
decoration: BoxDecoration(
|
||||
color: Color(0xFF2E2C2E),
|
||||
border: Border.all(width: 1, color: Colors.grey.withOpacity(0.05)),
|
||||
borderRadius: BorderRadius.all(Radius.circular(20)),
|
||||
boxShadow: [
|
||||
BoxShadow(
|
||||
color: Colors.black.withOpacity(0.2),
|
||||
blurRadius: 5,
|
||||
spreadRadius: 1,
|
||||
offset: Offset(2.0, 2.0), // shadow direction: bottom right
|
||||
)
|
||||
],
|
||||
|
||||
),
|
||||
width: double.infinity,
|
||||
height: 100,
|
||||
child: Padding(padding: EdgeInsets.fromLTRB(10, 10, 10, 10),child: Row(
|
||||
children: [
|
||||
Container(
|
||||
height: 75,
|
||||
width: 75,
|
||||
decoration: BoxDecoration(
|
||||
image: DecorationImage(
|
||||
image: AssetImage("assets/images/dadju-cover-poison.png"),
|
||||
fit: BoxFit.cover,
|
||||
),
|
||||
border: Border.all(width: 0, color: Colors.grey.withOpacity(0)),
|
||||
borderRadius: BorderRadius.all(Radius.circular(15)),
|
||||
),),
|
||||
SizedBox(
|
||||
),
|
||||
Container(
|
||||
margin: EdgeInsets.fromLTRB(20, 0, 0, 0),
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
Text('Ma vie',style: TextStyle(fontFamily: 'DMSans', color: Colors.white.withOpacity(1) ,fontSize: 20, fontWeight: FontWeight.w800),),
|
||||
Text('Dadju',style: TextStyle(fontFamily: 'DMSans', color: Colors.white.withOpacity(0.6) ,fontSize: 16, fontWeight: FontWeight.w400),),
|
||||
|
||||
],
|
||||
),),
|
||||
],
|
||||
),),
|
||||
),
|
||||
|
||||
],
|
||||
)
|
||||
),
|
||||
Container(
|
||||
margin: EdgeInsets.fromLTRB(30, 10, 30, 0),
|
||||
child: Column(
|
||||
children: [
|
||||
Text('Pour mon mariage',style: TextStyle(fontFamily: 'DMSans', color: Colors.white.withOpacity(1) ,fontSize: 20, fontWeight: FontWeight.w800),),
|
||||
|
||||
Container(
|
||||
margin: EdgeInsets.fromLTRB(0, 10, 0, 0),
|
||||
decoration: BoxDecoration(
|
||||
color: Color(0xFF2E2C2E),
|
||||
border: Border.all(width: 1, color: Colors.grey.withOpacity(0.05)),
|
||||
borderRadius: BorderRadius.all(Radius.circular(20)),
|
||||
boxShadow: [
|
||||
BoxShadow(
|
||||
color: Colors.black.withOpacity(0.2),
|
||||
blurRadius: 5,
|
||||
spreadRadius: 1,
|
||||
offset: Offset(2.0, 2.0), // shadow direction: bottom right
|
||||
)
|
||||
],
|
||||
|
||||
),
|
||||
width: double.infinity,
|
||||
height: 100,
|
||||
child: Padding(padding: EdgeInsets.fromLTRB(10, 10, 10, 10),child: Row(
|
||||
children: [
|
||||
Container(
|
||||
height: 75,
|
||||
width: 75,
|
||||
decoration: BoxDecoration(
|
||||
image: DecorationImage(
|
||||
image: AssetImage("assets/images/dadju-cover-poison.png"),
|
||||
fit: BoxFit.cover,
|
||||
),
|
||||
border: Border.all(width: 0, color: Colors.grey.withOpacity(0)),
|
||||
borderRadius: BorderRadius.all(Radius.circular(15)),
|
||||
),),
|
||||
SizedBox(
|
||||
),
|
||||
Container(
|
||||
margin: EdgeInsets.fromLTRB(20, 0, 0, 0),
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
Text('Ma vie',style: TextStyle(fontFamily: 'DMSans', color: Colors.white.withOpacity(1) ,fontSize: 20, fontWeight: FontWeight.w800),),
|
||||
Text('Dadju',style: TextStyle(fontFamily: 'DMSans', color: Colors.white.withOpacity(0.6) ,fontSize: 16, fontWeight: FontWeight.w400),),
|
||||
|
||||
],
|
||||
),),
|
||||
],
|
||||
),),
|
||||
),
|
||||
|
||||
],
|
||||
)
|
||||
),
|
||||
Container(
|
||||
margin: EdgeInsets.fromLTRB(30, 10, 30, 0),
|
||||
child: Column(
|
||||
children: [
|
||||
Text('Pour mon mariage',style: TextStyle(fontFamily: 'DMSans', color: Colors.white.withOpacity(1) ,fontSize: 20, fontWeight: FontWeight.w800),),
|
||||
|
||||
Container(
|
||||
margin: EdgeInsets.fromLTRB(0, 10, 0, 0),
|
||||
decoration: BoxDecoration(
|
||||
color: Color(0xFF2E2C2E),
|
||||
border: Border.all(width: 1, color: Colors.grey.withOpacity(0.05)),
|
||||
borderRadius: BorderRadius.all(Radius.circular(20)),
|
||||
boxShadow: [
|
||||
BoxShadow(
|
||||
color: Colors.black.withOpacity(0.2),
|
||||
blurRadius: 5,
|
||||
spreadRadius: 1,
|
||||
offset: Offset(2.0, 2.0), // shadow direction: bottom right
|
||||
)
|
||||
],
|
||||
|
||||
),
|
||||
width: double.infinity,
|
||||
height: 100,
|
||||
child: Padding(padding: EdgeInsets.fromLTRB(10, 10, 10, 10),child: Row(
|
||||
children: [
|
||||
Container(
|
||||
height: 75,
|
||||
width: 75,
|
||||
decoration: BoxDecoration(
|
||||
image: DecorationImage(
|
||||
image: AssetImage("assets/images/dadju-cover-poison.png"),
|
||||
fit: BoxFit.cover,
|
||||
),
|
||||
border: Border.all(width: 0, color: Colors.grey.withOpacity(0)),
|
||||
borderRadius: BorderRadius.all(Radius.circular(15)),
|
||||
),),
|
||||
SizedBox(
|
||||
),
|
||||
Container(
|
||||
margin: EdgeInsets.fromLTRB(20, 0, 0, 0),
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
Text('Ma vie',style: TextStyle(fontFamily: 'DMSans', color: Colors.white.withOpacity(1) ,fontSize: 20, fontWeight: FontWeight.w800),),
|
||||
Text('Dadju',style: TextStyle(fontFamily: 'DMSans', color: Colors.white.withOpacity(0.6) ,fontSize: 16, fontWeight: FontWeight.w400),),
|
||||
|
||||
],
|
||||
),),
|
||||
],
|
||||
),),
|
||||
),
|
||||
|
||||
],
|
||||
)
|
||||
),
|
||||
Container(
|
||||
margin: EdgeInsets.fromLTRB(30, 10, 30, 0),
|
||||
child: Column(
|
||||
children: [
|
||||
Text('Pour mon mariage',style: TextStyle(fontFamily: 'DMSans', color: Colors.white.withOpacity(1) ,fontSize: 20, fontWeight: FontWeight.w800),),
|
||||
|
||||
Container(
|
||||
margin: EdgeInsets.fromLTRB(0, 10, 0, 0),
|
||||
decoration: BoxDecoration(
|
||||
color: Color(0xFF2E2C2E),
|
||||
border: Border.all(width: 1, color: Colors.grey.withOpacity(0.05)),
|
||||
borderRadius: BorderRadius.all(Radius.circular(20)),
|
||||
boxShadow: [
|
||||
BoxShadow(
|
||||
color: Colors.black.withOpacity(0.2),
|
||||
blurRadius: 5,
|
||||
spreadRadius: 1,
|
||||
offset: Offset(2.0, 2.0), // shadow direction: bottom right
|
||||
)
|
||||
],
|
||||
|
||||
),
|
||||
width: double.infinity,
|
||||
height: 100,
|
||||
child: Padding(padding: EdgeInsets.fromLTRB(10, 10, 10, 10),child: Row(
|
||||
children: [
|
||||
Container(
|
||||
height: 75,
|
||||
width: 75,
|
||||
decoration: BoxDecoration(
|
||||
image: DecorationImage(
|
||||
image: AssetImage("assets/images/dadju-cover-poison.png"),
|
||||
fit: BoxFit.cover,
|
||||
),
|
||||
border: Border.all(width: 0, color: Colors.grey.withOpacity(0)),
|
||||
borderRadius: BorderRadius.all(Radius.circular(15)),
|
||||
),),
|
||||
SizedBox(
|
||||
),
|
||||
Container(
|
||||
margin: EdgeInsets.fromLTRB(20, 0, 0, 0),
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
Text('Ma vie',style: TextStyle(fontFamily: 'DMSans', color: Colors.white.withOpacity(1) ,fontSize: 20, fontWeight: FontWeight.w800),),
|
||||
Text('Dadju',style: TextStyle(fontFamily: 'DMSans', color: Colors.white.withOpacity(0.6) ,fontSize: 16, fontWeight: FontWeight.w400),),
|
||||
|
||||
],
|
||||
),),
|
||||
],
|
||||
),),
|
||||
),
|
||||
|
||||
],
|
||||
)
|
||||
),
|
||||
Container(
|
||||
margin: EdgeInsets.fromLTRB(30, 10, 30, 0),
|
||||
child: Column(
|
||||
children: [
|
||||
Text('Pour mon mariage',style: TextStyle(fontFamily: 'DMSans', color: Colors.white.withOpacity(1) ,fontSize: 20, fontWeight: FontWeight.w800),),
|
||||
|
||||
Container(
|
||||
margin: EdgeInsets.fromLTRB(0, 10, 0, 0),
|
||||
decoration: BoxDecoration(
|
||||
color: Color(0xFF2E2C2E),
|
||||
border: Border.all(width: 1, color: Colors.grey.withOpacity(0.05)),
|
||||
borderRadius: BorderRadius.all(Radius.circular(20)),
|
||||
boxShadow: [
|
||||
BoxShadow(
|
||||
color: Colors.black.withOpacity(0.2),
|
||||
blurRadius: 5,
|
||||
spreadRadius: 1,
|
||||
offset: Offset(2.0, 2.0), // shadow direction: bottom right
|
||||
)
|
||||
],
|
||||
|
||||
),
|
||||
width: double.infinity,
|
||||
height: 100,
|
||||
child: Padding(padding: EdgeInsets.fromLTRB(10, 10, 10, 10),child: Row(
|
||||
children: [
|
||||
Container(
|
||||
height: 75,
|
||||
width: 75,
|
||||
decoration: BoxDecoration(
|
||||
image: DecorationImage(
|
||||
image: AssetImage("assets/images/dadju-cover-poison.png"),
|
||||
fit: BoxFit.cover,
|
||||
),
|
||||
border: Border.all(width: 0, color: Colors.grey.withOpacity(0)),
|
||||
borderRadius: BorderRadius.all(Radius.circular(15)),
|
||||
),),
|
||||
SizedBox(
|
||||
),
|
||||
Container(
|
||||
margin: EdgeInsets.fromLTRB(20, 0, 0, 0),
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
Text('Ma vie',style: TextStyle(fontFamily: 'DMSans', color: Colors.white.withOpacity(1) ,fontSize: 20, fontWeight: FontWeight.w800),),
|
||||
Text('Dadju',style: TextStyle(fontFamily: 'DMSans', color: Colors.white.withOpacity(0.6) ,fontSize: 16, fontWeight: FontWeight.w400),),
|
||||
|
||||
],
|
||||
),),
|
||||
],
|
||||
),),
|
||||
),
|
||||
|
||||
],
|
||||
)
|
||||
),
|
||||
Container(
|
||||
margin: EdgeInsets.fromLTRB(30, 10, 30, 0),
|
||||
child: Column(
|
||||
children: [
|
||||
Text('Pour mon mariage',style: TextStyle(fontFamily: 'DMSans', color: Colors.white.withOpacity(1) ,fontSize: 20, fontWeight: FontWeight.w800),),
|
||||
|
||||
Container(
|
||||
margin: EdgeInsets.fromLTRB(0, 10, 0, 0),
|
||||
decoration: BoxDecoration(
|
||||
color: Color(0xFF2E2C2E),
|
||||
border: Border.all(width: 1, color: Colors.grey.withOpacity(0.05)),
|
||||
borderRadius: BorderRadius.all(Radius.circular(20)),
|
||||
boxShadow: [
|
||||
BoxShadow(
|
||||
color: Colors.black.withOpacity(0.2),
|
||||
blurRadius: 5,
|
||||
spreadRadius: 1,
|
||||
offset: Offset(2.0, 2.0), // shadow direction: bottom right
|
||||
)
|
||||
],
|
||||
|
||||
),
|
||||
width: double.infinity,
|
||||
height: 100,
|
||||
child: Padding(padding: EdgeInsets.fromLTRB(10, 10, 10, 10),child: Row(
|
||||
children: [
|
||||
Container(
|
||||
height: 75,
|
||||
width: 75,
|
||||
decoration: BoxDecoration(
|
||||
image: DecorationImage(
|
||||
image: AssetImage("assets/images/dadju-cover-poison.png"),
|
||||
fit: BoxFit.cover,
|
||||
),
|
||||
border: Border.all(width: 0, color: Colors.grey.withOpacity(0)),
|
||||
borderRadius: BorderRadius.all(Radius.circular(15)),
|
||||
),),
|
||||
SizedBox(
|
||||
),
|
||||
Container(
|
||||
margin: EdgeInsets.fromLTRB(20, 0, 0, 0),
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
Text('Ma vie',style: TextStyle(fontFamily: 'DMSans', color: Colors.white.withOpacity(1) ,fontSize: 20, fontWeight: FontWeight.w800),),
|
||||
Text('Dadju',style: TextStyle(fontFamily: 'DMSans', color: Colors.white.withOpacity(0.6) ,fontSize: 16, fontWeight: FontWeight.w400),),
|
||||
|
||||
],
|
||||
),),
|
||||
],
|
||||
),),
|
||||
),
|
||||
|
||||
],
|
||||
)
|
||||
),
|
||||
Container(
|
||||
margin: EdgeInsets.fromLTRB(30, 10, 30, 0),
|
||||
child: Column(
|
||||
children: [
|
||||
Text('Pour mon mariage',style: TextStyle(fontFamily: 'DMSans', color: Colors.white.withOpacity(1) ,fontSize: 20, fontWeight: FontWeight.w800),),
|
||||
|
||||
Container(
|
||||
margin: EdgeInsets.fromLTRB(0, 10, 0, 0),
|
||||
decoration: BoxDecoration(
|
||||
color: Color(0xFF2E2C2E),
|
||||
border: Border.all(width: 1, color: Colors.grey.withOpacity(0.05)),
|
||||
borderRadius: BorderRadius.all(Radius.circular(20)),
|
||||
boxShadow: [
|
||||
BoxShadow(
|
||||
color: Colors.black.withOpacity(0.2),
|
||||
blurRadius: 5,
|
||||
spreadRadius: 1,
|
||||
offset: Offset(2.0, 2.0), // shadow direction: bottom right
|
||||
)
|
||||
],
|
||||
|
||||
),
|
||||
width: double.infinity,
|
||||
height: 100,
|
||||
child: Padding(padding: EdgeInsets.fromLTRB(10, 10, 10, 10),child: Row(
|
||||
children: [
|
||||
Container(
|
||||
height: 75,
|
||||
width: 75,
|
||||
decoration: BoxDecoration(
|
||||
image: DecorationImage(
|
||||
image: AssetImage("assets/images/dadju-cover-poison.png"),
|
||||
fit: BoxFit.cover,
|
||||
),
|
||||
border: Border.all(width: 0, color: Colors.grey.withOpacity(0)),
|
||||
borderRadius: BorderRadius.all(Radius.circular(15)),
|
||||
),),
|
||||
SizedBox(
|
||||
),
|
||||
Container(
|
||||
margin: EdgeInsets.fromLTRB(20, 0, 0, 0),
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
Text('Ma vie',style: TextStyle(fontFamily: 'DMSans', color: Colors.white.withOpacity(1) ,fontSize: 20, fontWeight: FontWeight.w800),),
|
||||
Text('Dadju',style: TextStyle(fontFamily: 'DMSans', color: Colors.white.withOpacity(0.6) ,fontSize: 16, fontWeight: FontWeight.w400),),
|
||||
|
||||
],
|
||||
),),
|
||||
],
|
||||
),),
|
||||
),
|
||||
|
||||
],
|
||||
)
|
||||
),
|
||||
Container(
|
||||
margin: EdgeInsets.fromLTRB(30, 10, 30, 0),
|
||||
child: Column(
|
||||
children: [
|
||||
Text('Pour mon mariage',style: TextStyle(fontFamily: 'DMSans', color: Colors.white.withOpacity(1) ,fontSize: 20, fontWeight: FontWeight.w800),),
|
||||
|
||||
Container(
|
||||
margin: EdgeInsets.fromLTRB(0, 10, 0, 0),
|
||||
decoration: BoxDecoration(
|
||||
color: Color(0xFF2E2C2E),
|
||||
border: Border.all(width: 1, color: Colors.grey.withOpacity(0.05)),
|
||||
borderRadius: BorderRadius.all(Radius.circular(20)),
|
||||
boxShadow: [
|
||||
BoxShadow(
|
||||
color: Colors.black.withOpacity(0.2),
|
||||
blurRadius: 5,
|
||||
spreadRadius: 1,
|
||||
offset: Offset(2.0, 2.0), // shadow direction: bottom right
|
||||
)
|
||||
],
|
||||
|
||||
),
|
||||
width: double.infinity,
|
||||
height: 100,
|
||||
child: Padding(padding: EdgeInsets.fromLTRB(10, 10, 10, 10),child: Row(
|
||||
children: [
|
||||
Container(
|
||||
height: 75,
|
||||
width: 75,
|
||||
decoration: BoxDecoration(
|
||||
image: DecorationImage(
|
||||
image: AssetImage("assets/images/dadju-cover-poison.png"),
|
||||
fit: BoxFit.cover,
|
||||
),
|
||||
border: Border.all(width: 0, color: Colors.grey.withOpacity(0)),
|
||||
borderRadius: BorderRadius.all(Radius.circular(15)),
|
||||
),),
|
||||
SizedBox(
|
||||
),
|
||||
Container(
|
||||
margin: EdgeInsets.fromLTRB(20, 0, 0, 0),
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
Text('Ma vie',style: TextStyle(fontFamily: 'DMSans', color: Colors.white.withOpacity(1) ,fontSize: 20, fontWeight: FontWeight.w800),),
|
||||
Text('Dadju',style: TextStyle(fontFamily: 'DMSans', color: Colors.white.withOpacity(0.6) ,fontSize: 16, fontWeight: FontWeight.w400),),
|
||||
|
||||
],
|
||||
),),
|
||||
],
|
||||
),),
|
||||
),
|
||||
|
||||
],
|
||||
)
|
||||
),
|
||||
|
||||
],
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
class PreviewInfo extends StatelessWidget{
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
double height = MediaQuery.of(context).size.height;
|
||||
double width = MediaQuery.of(context).size.width;
|
||||
return Container(
|
||||
height: height*0.06,
|
||||
constraints: BoxConstraints(minWidth: 300, maxWidth: 400),
|
||||
margin: EdgeInsets.fromLTRB(width*0.1, 0, width*0.1, 0),
|
||||
decoration: BoxDecoration(
|
||||
color: Color(0xFF24243A).withOpacity(0.40),
|
||||
border: Border.all(width: 0, color: Colors.grey.withOpacity(0)),
|
||||
borderRadius: BorderRadius.all(Radius.circular(15)),
|
||||
),
|
||||
child: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
Text('Me découvrir...',style: TextStyle(fontFamily: 'DMSans', color: Colors.white.withOpacity(1) ,fontSize: 17, fontWeight: FontWeight.w800),),
|
||||
],
|
||||
),
|
||||
);
|
||||
|
||||
}
|
||||
}
|
@ -0,0 +1,334 @@
|
||||
# Generated by pub
|
||||
# See https://dart.dev/tools/pub/glossary#lockfile
|
||||
packages:
|
||||
animations:
|
||||
dependency: "direct main"
|
||||
description:
|
||||
name: animations
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "2.0.7"
|
||||
archive:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: archive
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "3.3.1"
|
||||
args:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: args
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "2.3.1"
|
||||
async:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: async
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "2.9.0"
|
||||
boolean_selector:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: boolean_selector
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "2.1.0"
|
||||
characters:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: characters
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "1.2.1"
|
||||
checked_yaml:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: checked_yaml
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "2.0.1"
|
||||
cli_util:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: cli_util
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "0.3.5"
|
||||
clock:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: clock
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "1.1.1"
|
||||
collection:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: collection
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "1.16.0"
|
||||
crypto:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: crypto
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "3.0.2"
|
||||
cupertino_icons:
|
||||
dependency: "direct main"
|
||||
description:
|
||||
name: cupertino_icons
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "1.0.5"
|
||||
fake_async:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: fake_async
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "1.3.1"
|
||||
flutter:
|
||||
dependency: "direct main"
|
||||
description: flutter
|
||||
source: sdk
|
||||
version: "0.0.0"
|
||||
flutter_launcher_icons:
|
||||
dependency: "direct dev"
|
||||
description:
|
||||
name: flutter_launcher_icons
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "0.10.0"
|
||||
flutter_lints:
|
||||
dependency: "direct dev"
|
||||
description:
|
||||
name: flutter_lints
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "2.0.1"
|
||||
flutter_swipable:
|
||||
dependency: "direct main"
|
||||
description:
|
||||
name: flutter_swipable
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "1.2.1"
|
||||
flutter_test:
|
||||
dependency: "direct dev"
|
||||
description: flutter
|
||||
source: sdk
|
||||
version: "0.0.0"
|
||||
flutter_web_plugins:
|
||||
dependency: transitive
|
||||
description: flutter
|
||||
source: sdk
|
||||
version: "0.0.0"
|
||||
fluttericon:
|
||||
dependency: "direct main"
|
||||
description:
|
||||
name: fluttericon
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "2.0.0"
|
||||
fluttertoast:
|
||||
dependency: "direct main"
|
||||
description:
|
||||
name: fluttertoast
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "8.0.9"
|
||||
graphs:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: graphs
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "2.1.0"
|
||||
http:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: http
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "0.13.5"
|
||||
http_parser:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: http_parser
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "4.0.1"
|
||||
image:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: image
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "3.2.0"
|
||||
js:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: js
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "0.6.4"
|
||||
json_annotation:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: json_annotation
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "4.7.0"
|
||||
lints:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: lints
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "2.0.0"
|
||||
matcher:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: matcher
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "0.12.12"
|
||||
material_color_utilities:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: material_color_utilities
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "0.1.5"
|
||||
meta:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: meta
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "1.8.0"
|
||||
nested:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: nested
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "1.0.0"
|
||||
page_transition:
|
||||
dependency: "direct main"
|
||||
description:
|
||||
name: page_transition
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "2.0.9"
|
||||
path:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: path
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "1.8.2"
|
||||
petitparser:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: petitparser
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "5.0.0"
|
||||
provider:
|
||||
dependency: "direct main"
|
||||
description:
|
||||
name: provider
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "6.0.4"
|
||||
rive:
|
||||
dependency: "direct main"
|
||||
description:
|
||||
name: rive
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "0.9.1"
|
||||
sky_engine:
|
||||
dependency: transitive
|
||||
description: flutter
|
||||
source: sdk
|
||||
version: "0.0.99"
|
||||
source_span:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: source_span
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "1.9.0"
|
||||
stack_trace:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: stack_trace
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "1.10.0"
|
||||
stream_channel:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: stream_channel
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "2.1.0"
|
||||
string_scanner:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: string_scanner
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "1.1.1"
|
||||
term_glyph:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: term_glyph
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "1.2.1"
|
||||
test_api:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: test_api
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "0.4.12"
|
||||
typed_data:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: typed_data
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "1.3.1"
|
||||
vector_math:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: vector_math
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "2.1.2"
|
||||
xml:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: xml
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "6.1.0"
|
||||
yaml:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: yaml
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "3.1.1"
|
||||
sdks:
|
||||
dart: ">=2.18.2 <3.0.0"
|
||||
flutter: ">=3.0.0"
|
@ -0,0 +1,108 @@
|
||||
name: daflmusic
|
||||
description: A new Flutter project.
|
||||
|
||||
# The following line prevents the package from being accidentally published to
|
||||
# pub.dev using `flutter pub publish`. This is preferred for private packages.
|
||||
publish_to: 'none' # Remove this line if you wish to publish to pub.dev
|
||||
|
||||
# The following defines the version and build number for your application.
|
||||
# A version number is three numbers separated by dots, like 1.2.43
|
||||
# followed by an optional build number separated by a +.
|
||||
# Both the version and the builder number may be overridden in flutter
|
||||
# build by specifying --build-name and --build-number, respectively.
|
||||
# In Android, build-name is used as versionName while build-number used as versionCode.
|
||||
# Read more about Android versioning at https://developer.android.com/studio/publish/versioning
|
||||
# In iOS, build-name is used as CFBundleShortVersionString while build-number is used as CFBundleVersion.
|
||||
# Read more about iOS versioning at
|
||||
# https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html
|
||||
# In Windows, build-name is used as the major, minor, and patch parts
|
||||
# of the product and file versions while build-number is used as the build suffix.
|
||||
version: 1.0.0+1
|
||||
|
||||
environment:
|
||||
sdk: '>=2.18.2 <3.0.0'
|
||||
|
||||
# Dependencies specify other packages that your package needs in order to work.
|
||||
# To automatically upgrade your package dependencies to the latest versions
|
||||
# consider running `flutter pub upgrade --major-versions`. Alternatively,
|
||||
# dependencies can be manually updated by changing the version numbers below to
|
||||
# the latest version available on pub.dev. To see which dependencies have newer
|
||||
# versions available, run `flutter pub outdated`.
|
||||
dependencies:
|
||||
|
||||
flutter:
|
||||
sdk: flutter
|
||||
|
||||
|
||||
|
||||
|
||||
# The following adds the Cupertino Icons font to your application.
|
||||
# Use with the CupertinoIcons class for iOS style icons.
|
||||
cupertino_icons: ^1.0.2
|
||||
page_transition: ^2.0.9
|
||||
fluttericon: ^2.0.0
|
||||
animations: ^2.0.7
|
||||
flutter_swipable: ^1.0.0
|
||||
provider: ^6.0.1
|
||||
fluttertoast: ^8.0.9
|
||||
rive: ^0.9.1
|
||||
|
||||
|
||||
|
||||
dev_dependencies:
|
||||
flutter_test:
|
||||
sdk: flutter
|
||||
flutter_lints: ^2.0.0
|
||||
|
||||
flutter_launcher_icons: ^0.10.0
|
||||
|
||||
flutter_icons:
|
||||
android: true
|
||||
ios: true
|
||||
image_path: "assets/images/Logo_luancher_2.png"
|
||||
|
||||
|
||||
flutter:
|
||||
|
||||
# The following line ensures that the Material Icons font is
|
||||
# included with your application, so that you can use the icons in
|
||||
# the material Icons class.
|
||||
uses-material-design: true
|
||||
|
||||
# To add assets to your application, add an assets section, like this:
|
||||
assets:
|
||||
- assets/images/
|
||||
|
||||
# An image asset can refer to one or more resolution-specific "variants", see
|
||||
# https://flutter.dev/assets-and-images/#resolution-aware
|
||||
|
||||
# For details regarding adding assets from package dependencies, see
|
||||
# https://flutter.dev/assets-and-images/#from-packages
|
||||
|
||||
# To add custom fonts to your application, add a fonts section here,
|
||||
# in this "flutter" section. Each entry in this list should have a
|
||||
# "family" key with the font family name, and a "fonts" key with a
|
||||
# list giving the asset and other descriptors for the font. For
|
||||
# example:
|
||||
fonts:
|
||||
- family: DMSans
|
||||
fonts:
|
||||
- asset: assets/fonts/DMSans-Regular.ttf
|
||||
- asset: assets/fonts/DMSans-Bold.ttf
|
||||
weight: 700
|
||||
- asset: assets/fonts/DMSans-Italic.ttf
|
||||
style: italic
|
||||
- asset: assets/fonts/DMSans-Medium.ttf
|
||||
weight: 300
|
||||
|
||||
- family: Silkscreen
|
||||
fonts:
|
||||
- asset: assets/fonts/Silkscreen-Regular.ttf
|
||||
|
||||
- family: MyFlutterApp
|
||||
fonts:
|
||||
- asset: assets/fonts/MyFlutterApp_regular.ttf
|
||||
|
||||
#
|
||||
# For details regarding fonts from package dependencies,
|
||||
# see https://flutter.dev/custom-fonts/#from-packages
|