diff --git a/.idea/Daflv4.iml b/.idea/Daflv4.iml index 508dab8..0a4c8b0 100644 --- a/.idea/Daflv4.iml +++ b/.idea/Daflv4.iml @@ -30,6 +30,18 @@ + + + + + + + + + + + + diff --git a/.idea/libraries/Dart_Packages.xml b/.idea/libraries/Dart_Packages.xml index 86b1c24..6362b19 100644 --- a/.idea/libraries/Dart_Packages.xml +++ b/.idea/libraries/Dart_Packages.xml @@ -5,582 +5,582 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 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/Flutter/Debug.xcconfig b/Sources/dafl_project_flutter/ios/Flutter/Debug.xcconfig index 592ceee..ec97fc6 100644 --- a/Sources/dafl_project_flutter/ios/Flutter/Debug.xcconfig +++ b/Sources/dafl_project_flutter/ios/Flutter/Debug.xcconfig @@ -1 +1,2 @@ +#include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig" #include "Generated.xcconfig" diff --git a/Sources/dafl_project_flutter/ios/Flutter/Release.xcconfig b/Sources/dafl_project_flutter/ios/Flutter/Release.xcconfig index 592ceee..c4855bf 100644 --- a/Sources/dafl_project_flutter/ios/Flutter/Release.xcconfig +++ b/Sources/dafl_project_flutter/ios/Flutter/Release.xcconfig @@ -1 +1,2 @@ +#include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig" #include "Generated.xcconfig" diff --git a/Sources/dafl_project_flutter/ios/Podfile b/Sources/dafl_project_flutter/ios/Podfile new file mode 100644 index 0000000..88359b2 --- /dev/null +++ b/Sources/dafl_project_flutter/ios/Podfile @@ -0,0 +1,41 @@ +# Uncomment this line to define a global platform for your project +# platform :ios, '11.0' + +# CocoaPods analytics sends network stats synchronously affecting flutter build latency. +ENV['COCOAPODS_DISABLE_STATS'] = 'true' + +project 'Runner', { + 'Debug' => :debug, + 'Profile' => :release, + 'Release' => :release, +} + +def flutter_root + generated_xcode_build_settings_path = File.expand_path(File.join('..', 'Flutter', 'Generated.xcconfig'), __FILE__) + unless File.exist?(generated_xcode_build_settings_path) + raise "#{generated_xcode_build_settings_path} must exist. If you're running pod install manually, make sure flutter pub get is executed first" + end + + File.foreach(generated_xcode_build_settings_path) do |line| + matches = line.match(/FLUTTER_ROOT\=(.*)/) + return matches[1].strip if matches + end + raise "FLUTTER_ROOT not found in #{generated_xcode_build_settings_path}. Try deleting Generated.xcconfig, then run flutter pub get" +end + +require File.expand_path(File.join('packages', 'flutter_tools', 'bin', 'podhelper'), flutter_root) + +flutter_ios_podfile_setup + +target 'Runner' do + use_frameworks! + use_modular_headers! + + flutter_install_all_ios_pods File.dirname(File.realpath(__FILE__)) +end + +post_install do |installer| + installer.pods_project.targets.each do |target| + flutter_additional_ios_build_settings(target) + end +end diff --git a/Sources/dafl_project_flutter/ios/Podfile.lock b/Sources/dafl_project_flutter/ios/Podfile.lock new file mode 100644 index 0000000..6d41903 --- /dev/null +++ b/Sources/dafl_project_flutter/ios/Podfile.lock @@ -0,0 +1,47 @@ +PODS: + - Flutter (1.0.0) + - flutter_native_splash (0.0.1): + - Flutter + - fluttertoast (0.0.2): + - Flutter + - Toast + - path_provider_ios (0.0.1): + - Flutter + - Toast (4.0.0) + - vibration (1.7.5): + - Flutter + +DEPENDENCIES: + - Flutter (from `Flutter`) + - flutter_native_splash (from `.symlinks/plugins/flutter_native_splash/ios`) + - fluttertoast (from `.symlinks/plugins/fluttertoast/ios`) + - path_provider_ios (from `.symlinks/plugins/path_provider_ios/ios`) + - vibration (from `.symlinks/plugins/vibration/ios`) + +SPEC REPOS: + trunk: + - Toast + +EXTERNAL SOURCES: + Flutter: + :path: Flutter + flutter_native_splash: + :path: ".symlinks/plugins/flutter_native_splash/ios" + fluttertoast: + :path: ".symlinks/plugins/fluttertoast/ios" + path_provider_ios: + :path: ".symlinks/plugins/path_provider_ios/ios" + vibration: + :path: ".symlinks/plugins/vibration/ios" + +SPEC CHECKSUMS: + Flutter: f04841e97a9d0b0a8025694d0796dd46242b2854 + flutter_native_splash: 52501b97d1c0a5f898d687f1646226c1f93c56ef + fluttertoast: 74526702fea2c060ea55dde75895b7e1bde1c86b + path_provider_ios: 14f3d2fd28c4fdb42f44e0f751d12861c43cee02 + Toast: 91b396c56ee72a5790816f40d3a94dd357abc196 + vibration: 7d883d141656a1c1a6d8d238616b2042a51a1241 + +PODFILE CHECKSUM: ef19549a9bc3046e7bb7d2fab4d021637c0c58a3 + +COCOAPODS: 1.11.3 diff --git a/Sources/dafl_project_flutter/ios/Runner.xcodeproj/project.pbxproj b/Sources/dafl_project_flutter/ios/Runner.xcodeproj/project.pbxproj index 21ce897..5651d52 100644 --- a/Sources/dafl_project_flutter/ios/Runner.xcodeproj/project.pbxproj +++ b/Sources/dafl_project_flutter/ios/Runner.xcodeproj/project.pbxproj @@ -9,6 +9,7 @@ /* Begin PBXBuildFile section */ 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */ = {isa = PBXBuildFile; fileRef = 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */; }; 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */ = {isa = PBXBuildFile; fileRef = 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */; }; + 56603186FD0491FFC157C451 /* Pods_Runner.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D9F96A939E72163035AC6113 /* Pods_Runner.framework */; }; 74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 74858FAE1ED2DC5600515810 /* AppDelegate.swift */; }; 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FA1CF9000F007C117D /* Main.storyboard */; }; 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FD1CF9000F007C117D /* Assets.xcassets */; }; @@ -29,6 +30,7 @@ /* End PBXCopyFilesBuildPhase section */ /* Begin PBXFileReference section */ + 05FB6061F1FF29B3B9E4D028 /* Pods-Runner.profile.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.profile.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.profile.xcconfig"; sourceTree = ""; }; 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GeneratedPluginRegistrant.h; sourceTree = ""; }; 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GeneratedPluginRegistrant.m; sourceTree = ""; }; 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = AppFrameworkInfo.plist; path = Flutter/AppFrameworkInfo.plist; sourceTree = ""; }; @@ -42,6 +44,9 @@ 97C146FD1CF9000F007C117D /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; 97C147001CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; 97C147021CF9000F007C117D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + AA4D0BF17C9CFE7BC6080122 /* Pods-Runner.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.debug.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig"; sourceTree = ""; }; + D9F96A939E72163035AC6113 /* Pods_Runner.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Runner.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + DF9436B870BC50F36A3F1BC8 /* Pods-Runner.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.release.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig"; sourceTree = ""; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ @@ -49,6 +54,7 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( + 56603186FD0491FFC157C451 /* Pods_Runner.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -72,6 +78,8 @@ 9740EEB11CF90186004384FC /* Flutter */, 97C146F01CF9000F007C117D /* Runner */, 97C146EF1CF9000F007C117D /* Products */, + C12164027BBF046CA7CA1CE9 /* Pods */, + D041563FF6043A51C062CD22 /* Frameworks */, ); sourceTree = ""; }; @@ -98,6 +106,25 @@ path = Runner; sourceTree = ""; }; + C12164027BBF046CA7CA1CE9 /* Pods */ = { + isa = PBXGroup; + children = ( + AA4D0BF17C9CFE7BC6080122 /* Pods-Runner.debug.xcconfig */, + DF9436B870BC50F36A3F1BC8 /* Pods-Runner.release.xcconfig */, + 05FB6061F1FF29B3B9E4D028 /* Pods-Runner.profile.xcconfig */, + ); + name = Pods; + path = Pods; + sourceTree = ""; + }; + D041563FF6043A51C062CD22 /* Frameworks */ = { + isa = PBXGroup; + children = ( + D9F96A939E72163035AC6113 /* Pods_Runner.framework */, + ); + name = Frameworks; + sourceTree = ""; + }; /* End PBXGroup section */ /* Begin PBXNativeTarget section */ @@ -105,12 +132,14 @@ isa = PBXNativeTarget; buildConfigurationList = 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */; buildPhases = ( + 0CDF21A3B58AC238E2266285 /* [CP] Check Pods Manifest.lock */, 9740EEB61CF901F6004384FC /* Run Script */, 97C146EA1CF9000F007C117D /* Sources */, 97C146EB1CF9000F007C117D /* Frameworks */, 97C146EC1CF9000F007C117D /* Resources */, 9705A1C41CF9048500538489 /* Embed Frameworks */, 3B06AD1E1E4923F5004D2608 /* Thin Binary */, + 9E2222998A7DFB19CABF432B /* [CP] Embed Pods Frameworks */, ); buildRules = ( ); @@ -169,6 +198,28 @@ /* End PBXResourcesBuildPhase section */ /* Begin PBXShellScriptBuildPhase section */ + 0CDF21A3B58AC238E2266285 /* [CP] Check Pods Manifest.lock */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputFileListPaths = ( + ); + inputPaths = ( + "${PODS_PODFILE_DIR_PATH}/Podfile.lock", + "${PODS_ROOT}/Manifest.lock", + ); + name = "[CP] Check Pods Manifest.lock"; + outputFileListPaths = ( + ); + outputPaths = ( + "$(DERIVED_FILE_DIR)/Pods-Runner-checkManifestLockResult.txt", + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; + showEnvVarsInLog = 0; + }; 3B06AD1E1E4923F5004D2608 /* Thin Binary */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; @@ -197,6 +248,23 @@ shellPath = /bin/sh; shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" build"; }; + 9E2222998A7DFB19CABF432B /* [CP] Embed Pods Frameworks */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputFileListPaths = ( + "${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks-${CONFIGURATION}-input-files.xcfilelist", + ); + name = "[CP] Embed Pods Frameworks"; + outputFileListPaths = ( + "${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks-${CONFIGURATION}-output-files.xcfilelist", + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks.sh\"\n"; + showEnvVarsInLog = 0; + }; /* End PBXShellScriptBuildPhase section */ /* Begin PBXSourcesBuildPhase section */ diff --git a/Sources/dafl_project_flutter/ios/Runner.xcworkspace/contents.xcworkspacedata b/Sources/dafl_project_flutter/ios/Runner.xcworkspace/contents.xcworkspacedata index 1d526a1..21a3cc1 100644 --- a/Sources/dafl_project_flutter/ios/Runner.xcworkspace/contents.xcworkspacedata +++ b/Sources/dafl_project_flutter/ios/Runner.xcworkspace/contents.xcworkspacedata @@ -4,4 +4,7 @@ + + diff --git a/Sources/dafl_project_flutter/lib/main.dart b/Sources/dafl_project_flutter/lib/main.dart index 19fa439..01b07d9 100644 --- a/Sources/dafl_project_flutter/lib/main.dart +++ b/Sources/dafl_project_flutter/lib/main.dart @@ -11,6 +11,8 @@ import 'package:rive/rive.dart' as riv; import '../controller/controller.dart'; import '../model/music.dart'; import 'model/music.dart'; +import 'model/spot.dart'; +import 'model/user.dart'; void main() { MyApp mainApp = MyApp(); @@ -40,13 +42,13 @@ class MyApp extends StatelessWidget { enum CardStatus { like, disLike, discovery, message} class CardProvider extends ChangeNotifier{ - List _spotsList = MyApp().controller.currentUser.Spots; + List _spotsList = MyApp().controller.currentUser.Spots2; bool _isDragging = false; double _angle = 0; Offset _position = Offset.zero; Size _screenSize = Size.zero; - List get spotsList => _spotsList; + List get spotsList => _spotsList; bool get isDragging => _isDragging; Offset get position => _position; double get angle => _angle; @@ -157,8 +159,8 @@ class CardProvider extends ChangeNotifier{ _position -= Offset(0, -_screenSize.height); _discovery_card(); print("discovery"); - if(MyApp().controller.currentUser.Discovery.contains(MyApp().controller.currentUser.Spots?.last)){ - MyApp().controller.currentUser.Discovery.remove(MyApp().controller.currentUser.Spots?.last); + if(MyApp().controller.currentUser.Discovery.contains(MyApp().controller.currentUser.Spots2?.last.music)){ + MyApp().controller.currentUser.Discovery.remove(MyApp().controller.currentUser.Spots2?.last.music); Fluttertoast.showToast( msg: 'Supprimer', toastLength: Toast.LENGTH_SHORT, @@ -169,8 +171,8 @@ class CardProvider extends ChangeNotifier{ ); } else{ - if(MyApp().controller.currentUser.Spots?.last != null){ - MyApp().controller.currentUser.addDiscovery(MyApp().controller.currentUser.Spots.last); + if(MyApp().controller.currentUser.Spots2?.last != null){ + MyApp().controller.currentUser.addDiscovery(MyApp().controller.currentUser.Spots2.last.music); Fluttertoast.showToast( msg: 'Ajouté', toastLength: Toast.LENGTH_SHORT, @@ -204,79 +206,84 @@ class CardProvider extends ChangeNotifier{ builder: (context) => buildSheet(),); notifyListeners(); } - Widget buildSheet() => Container( - height: 550, - width: 350, - decoration: BoxDecoration( - boxShadow: [ - BoxShadow( - color: Colors.black.withOpacity(0.4), - offset: const Offset( - 0, - 0, + Widget buildSheet(){ + final messageTextField = TextEditingController(); + return Container( + height: 550, + width: 350, + decoration: BoxDecoration( + boxShadow: [ + BoxShadow( + color: Colors.black.withOpacity(0.4), + offset: const Offset( + 0, + 0, + ), + blurRadius: 10.0, + spreadRadius: 2.0, ), - blurRadius: 10.0, - spreadRadius: 2.0, + BoxShadow( + color: Colors.white.withOpacity(0.3), + offset: const Offset(0.0, 0.0), + blurRadius: 0.0, + spreadRadius: 0.0, + ),//BoxShadow//BoxShadow + ], + color: Color(0xFF232123), + borderRadius: BorderRadius.only( + topRight: Radius.circular(30), + topLeft: Radius.circular(30), ), - BoxShadow( - color: Colors.white.withOpacity(0.3), - offset: const Offset(0.0, 0.0), - blurRadius: 0.0, - spreadRadius: 0.0, - ),//BoxShadow//BoxShadow - ], - color: Color(0xFF232123), - borderRadius: BorderRadius.only( - topRight: Radius.circular(30), - topLeft: Radius.circular(30), ), - ), - child: Padding( - padding: EdgeInsets.fromLTRB(20, 10, 20, 10), - child: Column( - children: [ - - Container( - height: 5, - width: 130, - decoration: BoxDecoration( - borderRadius: BorderRadius.circular(20), - color: Color(0xFF8A8A8A), - ), - ), - SizedBox(height: 30,), - Container( - width: double.infinity, - height: 300, - decoration: BoxDecoration( - borderRadius: BorderRadius.circular(20), - color: Color(0xFF302C30), + child: Padding( + padding: EdgeInsets.fromLTRB(20, 10, 20, 10), + child: Column( + children: [ + + Container( + height: 5, + width: 130, + decoration: BoxDecoration( + borderRadius: BorderRadius.circular(20), + color: Color(0xFF8A8A8A), + ), ), - child: Padding( - padding: EdgeInsets.all(20), - child: TextField( - maxLength: 300, - style: TextStyle(fontFamily: 'DMSans', color: Colors.white.withOpacity(1) ,fontSize: 17, fontWeight: FontWeight.w200), - expands: true, - maxLines: null, - keyboardType: TextInputType.multiline, - decoration: InputDecoration( - hintStyle: TextStyle( - color: Colors.white, + SizedBox(height: 30,), + Container( + width: double.infinity, + height: 300, + decoration: BoxDecoration( + borderRadius: BorderRadius.circular(20), + color: Color(0xFF302C30), + ), + child: Padding( + padding: EdgeInsets.all(20), + child: TextField( + controller: messageTextField, + maxLength: 300, + style: TextStyle(fontFamily: 'DMSans', color: Colors.white.withOpacity(1) ,fontSize: 17, fontWeight: FontWeight.w200), + expands: true, + maxLines: null, + keyboardType: TextInputType.multiline, + decoration: InputDecoration( + hintStyle: TextStyle( + color: Colors.white, + ), + border: InputBorder.none, + hintText: "Mon message", ), - border: InputBorder.none, - hintText: "Mon message", ), ), ), - ), - SizedBox(height: 20,), - SizedBox( - width: double.infinity, - height: 70, - child: ElevatedButton( - onPressed: () {}, - style: ElevatedButton.styleFrom( + SizedBox(height: 20,), + SizedBox( + width: double.infinity, + height: 70, + child: ElevatedButton( + onPressed: () { + sendMessage(messageTextField.text, MyApp().controller.currentUser.Spots2.last.user); + }, + style: ElevatedButton.styleFrom( primary: Color(0xFF3F1DC3), textStyle: TextStyle( fontSize: 20, @@ -284,22 +291,29 @@ class CardProvider extends ChangeNotifier{ shape: RoundedRectangleBorder( borderRadius: BorderRadius.circular(17) ), + ), + child: Row( + mainAxisAlignment: MainAxisAlignment.end, + children: [ + Text("Envoyer"), + Opacity(opacity: 0.2, + child: Image.asset("assets/images/send_logo.png",),) + ], + ), ), - child: Row( - mainAxisAlignment: MainAxisAlignment.end, - children: [ - Text("Envoyer"), - Opacity(opacity: 0.2, - child: Image.asset("assets/images/send_logo.png",),) - ], - ), - ), - ) - ], + ) + ], + ), ), - ), - ); + ); + + + } + void sendMessage(String message, User destinataire){ + print(MyApp().controller.currentUser.Spots2.last.user.usernameDafl); + } + void like(context) { @@ -319,7 +333,7 @@ class CardProvider extends ChangeNotifier{ } else { await Future.delayed(Duration(milliseconds: 200)); - print(_spotsList.last.name); + print(_spotsList.last.music.name); _spotsList.removeLast(); resetPosition(); } diff --git a/Sources/dafl_project_flutter/lib/model/spot.dart b/Sources/dafl_project_flutter/lib/model/spot.dart new file mode 100644 index 0000000..634ba16 --- /dev/null +++ b/Sources/dafl_project_flutter/lib/model/spot.dart @@ -0,0 +1,13 @@ + +import 'package:dafl_project_flutter/model/user.dart'; +import 'package:dafl_project_flutter/model/music.dart'; + + +class Spot{ + + User user; + Music music; + + Spot(this.user, this.music); + +} \ No newline at end of file diff --git a/Sources/dafl_project_flutter/lib/model/user.dart b/Sources/dafl_project_flutter/lib/model/user.dart index f1063a4..56a269f 100644 --- a/Sources/dafl_project_flutter/lib/model/user.dart +++ b/Sources/dafl_project_flutter/lib/model/user.dart @@ -1,5 +1,7 @@ import 'package:dafl_project_flutter/main.dart'; -import 'package:dafl_project_flutter/model/message.dart'; +import 'package:dafl_project_flutter/model/spot.dart'; +import 'message.dart'; +import 'spot.dart'; import 'conversation.dart'; import 'music.dart'; @@ -28,14 +30,16 @@ class User{ Music currentSong = Music('Couleurs','Khali','https://khaligidilit.com/assets/images/cover-LAI%CC%88LA-Khali.jpeg'); - List Spots=[ + /*List Spots=[ Music('Couleurs','Khali','https://khaligidilit.com/assets/images/cover-LAI%CC%88LA-Khali.jpeg'), Music("J'suis PNL",'PNL','https://m.media-amazon.com/images/I/61aUOMzwS8L._SL1440_.jpg'), Music('Sundance','Nepal','https://pbs.twimg.com/media/ExJ-My-XMAE3Ko2.jpg'), Music('Eternelle 2','So La Lune','https://cdns-images.dzcdn.net/images/cover/2818a661c6d533155ce6dffc256b1f51/500x500.jpg'), Music('M.I.L.S 3','Ninho','https://cdns-images.dzcdn.net/images/cover/b351f0e935c9c3901f8d893b92ab952a/500x500.jpg'), Music('Deux frères','PNL','https://cdns-images.dzcdn.net/images/cover/65147b581f2ace9e0f0723ee76e70fda/500x500.jpg'), - Music('Paradis','Sopico','https://cdns-images.dzcdn.net/images/cover/17a9747927ac3e5ea56f92f635d9180c/500x500.jpg')].reversed.toList(); + Music('Paradis','Sopico','https://cdns-images.dzcdn.net/images/cover/17a9747927ac3e5ea56f92f635d9180c/500x500.jpg')].reversed.toList();*/ + + List Spots2= []; Map conversations={}; void addDiscovery(Music newmusic){ diff --git a/Sources/dafl_project_flutter/lib/views/pages/main/w_spot.dart b/Sources/dafl_project_flutter/lib/views/pages/main/w_spot.dart index fcfcdd0..3ebd2ed 100644 --- a/Sources/dafl_project_flutter/lib/views/pages/main/w_spot.dart +++ b/Sources/dafl_project_flutter/lib/views/pages/main/w_spot.dart @@ -36,7 +36,7 @@ class _SpotsWidgetState extends State { child: Container( decoration: BoxDecoration( image: DecorationImage( - image: NetworkImage(MyApp().controller.currentUser.Spots.isEmpty? "https://i.imgur.com/Uovh293.png":MyApp().controller.currentUser.Spots.last.linkCover), + image: NetworkImage(MyApp().controller.currentUser.Spots2.isEmpty? "https://i.imgur.com/Uovh293.png":MyApp().controller.currentUser.Spots2.last.music.linkCover), fit: BoxFit.cover, ), @@ -48,7 +48,7 @@ class _SpotsWidgetState extends State { ),), Align( alignment: FractionalOffset.bottomCenter, - child: MyApp().controller.currentUser.Spots.isEmpty? Container():OpenContainer( + child: MyApp().controller.currentUser.Spots2.isEmpty? Container():OpenContainer( closedColor: Colors.transparent, closedElevation: 0, @@ -71,7 +71,7 @@ class _SpotsWidgetState extends State { Positioned( top: height*0.68, width: width, - child: MyApp().controller.currentUser.Spots.isEmpty? Container():Row( + child: MyApp().controller.currentUser.Spots2.isEmpty? Container():Row( mainAxisAlignment: MainAxisAlignment.spaceEvenly, children: [ GestureDetector( @@ -151,9 +151,9 @@ class _SpotsWidgetState extends State { child: Column( crossAxisAlignment: CrossAxisAlignment.start, children: [ - Text(MyApp().controller.currentUser.Spots.isEmpty? '': - MyApp().controller.currentUser.Spots.last.name,style: TextStyle(fontFamily: 'DMSans', color: Colors.white.withOpacity(1) ,fontSize: 20, fontWeight: FontWeight.w800),), - Text(MyApp().controller.currentUser.Spots.isEmpty? '': MyApp().controller.currentUser.Spots.last.artist,style: TextStyle(fontFamily: 'DMSans', color: Colors.white.withOpacity(1) ,fontSize: 17, fontWeight: FontWeight.w200),), + Text(MyApp().controller.currentUser.Spots2.isEmpty? '': + MyApp().controller.currentUser.Spots2.last.music.name,style: TextStyle(fontFamily: 'DMSans', color: Colors.white.withOpacity(1) ,fontSize: 20, fontWeight: FontWeight.w800),), + Text(MyApp().controller.currentUser.Spots2.isEmpty? '': MyApp().controller.currentUser.Spots2.last.music.artist,style: TextStyle(fontFamily: 'DMSans', color: Colors.white.withOpacity(1) ,fontSize: 17, fontWeight: FontWeight.w200),), ], ),), ], @@ -169,7 +169,7 @@ class _SpotsWidgetState extends State { return Stack( children: urlImages .map((urlImage) => CardWidget( - urlImage: urlImage.linkCover, + urlImage: urlImage.music.linkCover, isFront: urlImages.last == urlImage, )) .toList(), 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 7b29836..50d9e3a 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 @@ -4,6 +4,8 @@ import 'package:dafl_project_flutter/views/pages/main/p_main.dart'; import 'package:flutter/material.dart'; import 'package:page_transition/page_transition.dart'; import '../../../main.dart'; +import '../../../model/music.dart'; +import '../../../model/spot.dart'; import '../sign_up/p_sign_up.dart'; class SignInPage extends StatefulWidget { @@ -239,6 +241,15 @@ class _SignInPageState extends State { else{ //MyApp().controller.load(userNameTextField.text, passwordTextField.text); MyApp().controller.currentUser = User(userNameTextField.text, passwordTextField.text); + MyApp().controller.currentUser.Spots2 = [ + 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(); Navigator.of(context).push( PageTransition( type: PageTransitionType.fade, diff --git a/Sources/dafl_project_flutter/macos/Flutter/Flutter-Debug.xcconfig b/Sources/dafl_project_flutter/macos/Flutter/Flutter-Debug.xcconfig index c2efd0b..4b81f9b 100644 --- a/Sources/dafl_project_flutter/macos/Flutter/Flutter-Debug.xcconfig +++ b/Sources/dafl_project_flutter/macos/Flutter/Flutter-Debug.xcconfig @@ -1 +1,2 @@ +#include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig" #include "ephemeral/Flutter-Generated.xcconfig" diff --git a/Sources/dafl_project_flutter/macos/Flutter/Flutter-Release.xcconfig b/Sources/dafl_project_flutter/macos/Flutter/Flutter-Release.xcconfig index c2efd0b..5caa9d1 100644 --- a/Sources/dafl_project_flutter/macos/Flutter/Flutter-Release.xcconfig +++ b/Sources/dafl_project_flutter/macos/Flutter/Flutter-Release.xcconfig @@ -1 +1,2 @@ +#include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig" #include "ephemeral/Flutter-Generated.xcconfig" diff --git a/Sources/dafl_project_flutter/macos/Podfile b/Sources/dafl_project_flutter/macos/Podfile new file mode 100644 index 0000000..dade8df --- /dev/null +++ b/Sources/dafl_project_flutter/macos/Podfile @@ -0,0 +1,40 @@ +platform :osx, '10.11' + +# CocoaPods analytics sends network stats synchronously affecting flutter build latency. +ENV['COCOAPODS_DISABLE_STATS'] = 'true' + +project 'Runner', { + 'Debug' => :debug, + 'Profile' => :release, + 'Release' => :release, +} + +def flutter_root + generated_xcode_build_settings_path = File.expand_path(File.join('..', 'Flutter', 'ephemeral', 'Flutter-Generated.xcconfig'), __FILE__) + unless File.exist?(generated_xcode_build_settings_path) + raise "#{generated_xcode_build_settings_path} must exist. If you're running pod install manually, make sure \"flutter pub get\" is executed first" + end + + File.foreach(generated_xcode_build_settings_path) do |line| + matches = line.match(/FLUTTER_ROOT\=(.*)/) + return matches[1].strip if matches + end + raise "FLUTTER_ROOT not found in #{generated_xcode_build_settings_path}. Try deleting Flutter-Generated.xcconfig, then run \"flutter pub get\"" +end + +require File.expand_path(File.join('packages', 'flutter_tools', 'bin', 'podhelper'), flutter_root) + +flutter_macos_podfile_setup + +target 'Runner' do + use_frameworks! + use_modular_headers! + + flutter_install_all_macos_pods File.dirname(File.realpath(__FILE__)) +end + +post_install do |installer| + installer.pods_project.targets.each do |target| + flutter_additional_macos_build_settings(target) + end +end diff --git a/Sources/dafl_project_flutter/pubspec.yaml b/Sources/dafl_project_flutter/pubspec.yaml index 728a5f8..e41b996 100644 --- a/Sources/dafl_project_flutter/pubspec.yaml +++ b/Sources/dafl_project_flutter/pubspec.yaml @@ -89,6 +89,7 @@ flutter: assets: - assets/images/ - assets/fonts/ + - assets/logs.txt # An image asset can refer to one or more resolution-specific "variants", see # https://flutter.dev/assets-and-images/#resolution-aware