From d9845f5fc7f5db3a6d3bd9f3e276d145410fbabd Mon Sep 17 00:00:00 2001 From: delanierlucas Date: Mon, 14 Nov 2022 21:41:29 +0100 Subject: [PATCH] reglage probleme liste spots --- .idea/libraries/Dart_Packages.xml | 72 +++++++++++++++++++ .idea/libraries/Dart_SDK.xml | 38 +++++----- Sources/dafl_project_flutter/ios/Podfile.lock | 20 ++++++ .../lib/controller/controller.dart | 14 ++++ .../lib/views/pages/home/p_home.dart | 2 +- .../lib/views/pages/main/w_discovery.dart | 3 + .../lib/views/pages/sign_in/p_sign_in.dart | 3 + Sources/dafl_project_flutter/pubspec.yaml | 1 - 8 files changed, 132 insertions(+), 21 deletions(-) diff --git a/.idea/libraries/Dart_Packages.xml b/.idea/libraries/Dart_Packages.xml index 279019c..6b14afa 100644 --- a/.idea/libraries/Dart_Packages.xml +++ b/.idea/libraries/Dart_Packages.xml @@ -135,6 +135,13 @@ + + + + + + @@ -191,6 +198,48 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -198,6 +247,13 @@ + + + + + + @@ -394,6 +450,13 @@ + + + + + + @@ -534,13 +597,21 @@ + + + + + + + + @@ -569,6 +640,7 @@ + diff --git a/.idea/libraries/Dart_SDK.xml b/.idea/libraries/Dart_SDK.xml index 6ae284f..b6e6985 100644 --- a/.idea/libraries/Dart_SDK.xml +++ b/.idea/libraries/Dart_SDK.xml @@ -1,25 +1,25 @@ - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + diff --git a/Sources/dafl_project_flutter/ios/Podfile.lock b/Sources/dafl_project_flutter/ios/Podfile.lock index fb54b7d..e18955c 100644 --- a/Sources/dafl_project_flutter/ios/Podfile.lock +++ b/Sources/dafl_project_flutter/ios/Podfile.lock @@ -1,12 +1,22 @@ PODS: - Flutter (1.0.0) + - flutter_inappwebview (0.0.1): + - Flutter + - flutter_inappwebview/Core (= 0.0.1) + - OrderedSet (~> 5.0) + - flutter_inappwebview/Core (0.0.1): + - Flutter + - OrderedSet (~> 5.0) - flutter_native_splash (0.0.1): - Flutter - fluttertoast (0.0.2): - Flutter - Toast + - geolocator_apple (1.2.0): + - Flutter - home_indicator (0.0.1): - Flutter + - OrderedSet (5.0.0) - path_provider_ios (0.0.1): - Flutter - Toast (4.0.0) @@ -15,23 +25,30 @@ PODS: DEPENDENCIES: - Flutter (from `Flutter`) + - flutter_inappwebview (from `.symlinks/plugins/flutter_inappwebview/ios`) - flutter_native_splash (from `.symlinks/plugins/flutter_native_splash/ios`) - fluttertoast (from `.symlinks/plugins/fluttertoast/ios`) + - geolocator_apple (from `.symlinks/plugins/geolocator_apple/ios`) - home_indicator (from `.symlinks/plugins/home_indicator/ios`) - path_provider_ios (from `.symlinks/plugins/path_provider_ios/ios`) - vibration (from `.symlinks/plugins/vibration/ios`) SPEC REPOS: trunk: + - OrderedSet - Toast EXTERNAL SOURCES: Flutter: :path: Flutter + flutter_inappwebview: + :path: ".symlinks/plugins/flutter_inappwebview/ios" flutter_native_splash: :path: ".symlinks/plugins/flutter_native_splash/ios" fluttertoast: :path: ".symlinks/plugins/fluttertoast/ios" + geolocator_apple: + :path: ".symlinks/plugins/geolocator_apple/ios" home_indicator: :path: ".symlinks/plugins/home_indicator/ios" path_provider_ios: @@ -41,9 +58,12 @@ EXTERNAL SOURCES: SPEC CHECKSUMS: Flutter: f04841e97a9d0b0a8025694d0796dd46242b2854 + flutter_inappwebview: bfd58618f49dc62f2676de690fc6dcda1d6c3721 flutter_native_splash: 52501b97d1c0a5f898d687f1646226c1f93c56ef fluttertoast: 74526702fea2c060ea55dde75895b7e1bde1c86b + geolocator_apple: cc556e6844d508c95df1e87e3ea6fa4e58c50401 home_indicator: 60c6a4b60d17173cd164c112eb9be37055b23af8 + OrderedSet: aaeb196f7fef5a9edf55d89760da9176ad40b93c path_provider_ios: 14f3d2fd28c4fdb42f44e0f751d12861c43cee02 Toast: 91b396c56ee72a5790816f40d3a94dd357abc196 vibration: 7d883d141656a1c1a6d8d238616b2042a51a1241 diff --git a/Sources/dafl_project_flutter/lib/controller/controller.dart b/Sources/dafl_project_flutter/lib/controller/controller.dart index 0d69754..39bc2f2 100644 --- a/Sources/dafl_project_flutter/lib/controller/controller.dart +++ b/Sources/dafl_project_flutter/lib/controller/controller.dart @@ -1,3 +1,5 @@ +import '../model/music.dart'; +import '../model/spot.dart'; import '../persistence/database_loader.dart'; import '../persistence/database_saver.dart'; import '../persistence/database_searcher.dart'; @@ -54,4 +56,16 @@ class Controller { Future searchByUsername(String username) async { return await _searcher.searchByUsername(username); } + + void chargeExample(){ + currentUser.spots = [ + Spot( User('Félix','1234'), Music('Couleurs','Khali','https://khaligidilit.com/assets/images/cover-LAI%CC%88LA-Khali.jpeg')), + Spot( User('Audric','1234'), Music("J'suis PNL",'PNL','https://m.media-amazon.com/images/I/61aUOMzwS8L._SL1440_.jpg')), + Spot( User('Dorian','1234'), Music('Sundance','Nepal','https://pbs.twimg.com/media/ExJ-My-XMAE3Ko2.jpg')), + Spot( User('Lucas','1234'), Music('Eternelle 2','So La Lune','https://cdns-images.dzcdn.net/images/cover/2818a661c6d533155ce6dffc256b1f51/500x500.jpg')), + Spot( User('David','1234'), Music('M.I.L.S 3','Ninho','https://cdns-images.dzcdn.net/images/cover/b351f0e935c9c3901f8d893b92ab952a/500x500.jpg')), + Spot( User('Hugo','1234'), Music('Deux frères','PNL','https://cdns-images.dzcdn.net/images/cover/65147b581f2ace9e0f0723ee76e70fda/500x500.jpg')), + Spot( User('Alban','1234'), Music('Paradis','Sopico','https://cdns-images.dzcdn.net/images/cover/17a9747927ac3e5ea56f92f635d9180c/500x500.jpg')), + ].reversed.toList(); + } } diff --git a/Sources/dafl_project_flutter/lib/views/pages/home/p_home.dart b/Sources/dafl_project_flutter/lib/views/pages/home/p_home.dart index 54cace6..daceb48 100644 --- a/Sources/dafl_project_flutter/lib/views/pages/home/p_home.dart +++ b/Sources/dafl_project_flutter/lib/views/pages/home/p_home.dart @@ -43,7 +43,7 @@ class _HomePageState extends State { width: width * 0.75, child: ElevatedButton( style: ElevatedButton.styleFrom( - backgroundColor: const Color(0xFF24CF5F), + backgroundColor: const Color(0xFF951DDE), shape: RoundedRectangleBorder( borderRadius: BorderRadius.circular(15.0), ) // background// foreground diff --git a/Sources/dafl_project_flutter/lib/views/pages/main/w_discovery.dart b/Sources/dafl_project_flutter/lib/views/pages/main/w_discovery.dart index 1267b24..ccb5e2d 100644 --- a/Sources/dafl_project_flutter/lib/views/pages/main/w_discovery.dart +++ b/Sources/dafl_project_flutter/lib/views/pages/main/w_discovery.dart @@ -164,6 +164,9 @@ class _DiscoveryListState extends State { if (direction == DismissDirection.startToEnd) MyApp.controller.currentUser.discovery .removeAt(reversedIndex); + setState(() { + itemCount -= 1; + }); }, background: Container( decoration: BoxDecoration( diff --git a/Sources/dafl_project_flutter/lib/views/pages/sign_in/p_sign_in.dart b/Sources/dafl_project_flutter/lib/views/pages/sign_in/p_sign_in.dart index 5264a36..b1cb057 100644 --- a/Sources/dafl_project_flutter/lib/views/pages/sign_in/p_sign_in.dart +++ b/Sources/dafl_project_flutter/lib/views/pages/sign_in/p_sign_in.dart @@ -1,6 +1,8 @@ import 'package:flutter/material.dart'; import 'package:page_transition/page_transition.dart'; import '../../../main.dart'; +import '../../../model/music.dart'; +import '../../../model/user.dart'; import '../sign_up/p_sign_up.dart'; class SignInPage extends StatefulWidget { @@ -264,6 +266,7 @@ class _SignInPageState extends State { .load(userNameTextField.text, passwordTextField.text); if (MyApp.controller.currentUser.usernameDafl != "") { + MyApp.controller.chargeExample(); Navigator.of(context).push( PageTransition( type: PageTransitionType.fade, diff --git a/Sources/dafl_project_flutter/pubspec.yaml b/Sources/dafl_project_flutter/pubspec.yaml index b309a65..95db087 100644 --- a/Sources/dafl_project_flutter/pubspec.yaml +++ b/Sources/dafl_project_flutter/pubspec.yaml @@ -56,7 +56,6 @@ flutter: assets: - assets/images/ - assets/fonts/ - - assets/ fonts: - family: DMSans