From da39e0e164248b67ff993035f1fa1a7c91497f24 Mon Sep 17 00:00:00 2001 From: Van Leemput Dayron Date: Sun, 5 Oct 2025 16:33:24 +0200 Subject: [PATCH] Add Google Maps integration and update UI components; change platform version and minimum SDK --- android/app/build.gradle.kts | 2 +- android/app/src/main/AndroidManifest.xml | 3 + .../reports/problems/problems-report.html | 663 ++++++++++++++++++ ios/Podfile | 2 +- ios/Podfile.lock | 24 +- ios/Runner.xcodeproj/project.pbxproj | 18 + ios/Runner/AppDelegate.swift | 2 + lib/components/group/group_content.dart | 4 +- lib/components/map/map_content.dart | 55 +- lib/pages/home.dart | 4 +- pubspec.lock | 88 +++ pubspec.yaml | 1 + 12 files changed, 846 insertions(+), 20 deletions(-) create mode 100644 android/build/reports/problems/problems-report.html diff --git a/android/app/build.gradle.kts b/android/app/build.gradle.kts index 9bd9a0b..bebc7c2 100644 --- a/android/app/build.gradle.kts +++ b/android/app/build.gradle.kts @@ -24,7 +24,7 @@ android { applicationId = "com.example.travel_mate" // You can update the following values to match your application needs. // For more information, see: https://flutter.dev/to/review-gradle-config. - minSdk = flutter.minSdkVersion + minSdkVersion 21 targetSdk = flutter.targetSdkVersion versionCode = flutter.versionCode versionName = flutter.versionName diff --git a/android/app/src/main/AndroidManifest.xml b/android/app/src/main/AndroidManifest.xml index e217b29..f374bbc 100644 --- a/android/app/src/main/AndroidManifest.xml +++ b/android/app/src/main/AndroidManifest.xml @@ -30,6 +30,9 @@ + + + + + + + + + Gradle Configuration Cache + + + +
+ +
+ Loading... +
+ + + + + + diff --git a/ios/Podfile b/ios/Podfile index 620e46e..c2c1dc5 100644 --- a/ios/Podfile +++ b/ios/Podfile @@ -1,5 +1,5 @@ # Uncomment this line to define a global platform for your project -# platform :ios, '13.0' +platform :ios, '14.0' # CocoaPods analytics sends network stats synchronously affecting flutter build latency. ENV['COCOAPODS_DISABLE_STATS'] = 'true' diff --git a/ios/Podfile.lock b/ios/Podfile.lock index 761fc02..1977782 100644 --- a/ios/Podfile.lock +++ b/ios/Podfile.lock @@ -1,5 +1,16 @@ PODS: - Flutter (1.0.0) + - Google-Maps-iOS-Utils (5.0.0): + - GoogleMaps (~> 8.0) + - google_maps_flutter_ios (0.0.1): + - Flutter + - Google-Maps-iOS-Utils (< 7.0, >= 5.0) + - GoogleMaps (< 10.0, >= 8.4) + - GoogleMaps (8.4.0): + - GoogleMaps/Maps (= 8.4.0) + - GoogleMaps/Base (8.4.0) + - GoogleMaps/Maps (8.4.0): + - GoogleMaps/Base - path_provider_foundation (0.0.1): - Flutter - FlutterMacOS @@ -9,12 +20,20 @@ PODS: DEPENDENCIES: - Flutter (from `Flutter`) + - google_maps_flutter_ios (from `.symlinks/plugins/google_maps_flutter_ios/ios`) - path_provider_foundation (from `.symlinks/plugins/path_provider_foundation/darwin`) - shared_preferences_foundation (from `.symlinks/plugins/shared_preferences_foundation/darwin`) +SPEC REPOS: + trunk: + - Google-Maps-iOS-Utils + - GoogleMaps + EXTERNAL SOURCES: Flutter: :path: Flutter + google_maps_flutter_ios: + :path: ".symlinks/plugins/google_maps_flutter_ios/ios" path_provider_foundation: :path: ".symlinks/plugins/path_provider_foundation/darwin" shared_preferences_foundation: @@ -22,9 +41,12 @@ EXTERNAL SOURCES: SPEC CHECKSUMS: Flutter: cabc95a1d2626b1b06e7179b784ebcf0c0cde467 + Google-Maps-iOS-Utils: 66d6de12be1ce6d3742a54661e7a79cb317a9321 + google_maps_flutter_ios: 0291eb2aa252298a769b04d075e4a9d747ff7264 + GoogleMaps: 8939898920281c649150e0af74aa291c60f2e77d path_provider_foundation: 080d55be775b7414fd5a5ef3ac137b97b097e564 shared_preferences_foundation: 9e1978ff2562383bd5676f64ec4e9aa8fa06a6f7 -PODFILE CHECKSUM: 3c63482e143d1b91d2d2560aee9fb04ecc74ac7e +PODFILE CHECKSUM: e30f02f9d1c72c47bb6344a0a748c9d268180865 COCOAPODS: 1.16.2 diff --git a/ios/Runner.xcodeproj/project.pbxproj b/ios/Runner.xcodeproj/project.pbxproj index 978f5ea..6d94167 100644 --- a/ios/Runner.xcodeproj/project.pbxproj +++ b/ios/Runner.xcodeproj/project.pbxproj @@ -199,6 +199,7 @@ 9705A1C41CF9048500538489 /* Embed Frameworks */, 3B06AD1E1E4923F5004D2608 /* Thin Binary */, 457D4D342621FBD6E3ADE104 /* [CP] Embed Pods Frameworks */, + 98675331487986E21AE48EE3 /* [CP] Copy Pods Resources */, ); buildRules = ( ); @@ -362,6 +363,23 @@ shellPath = /bin/sh; shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" build"; }; + 98675331487986E21AE48EE3 /* [CP] Copy Pods Resources */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputFileListPaths = ( + "${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-resources-${CONFIGURATION}-input-files.xcfilelist", + ); + name = "[CP] Copy Pods Resources"; + outputFileListPaths = ( + "${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-resources-${CONFIGURATION}-output-files.xcfilelist", + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-resources.sh\"\n"; + showEnvVarsInLog = 0; + }; /* End PBXShellScriptBuildPhase section */ /* Begin PBXSourcesBuildPhase section */ diff --git a/ios/Runner/AppDelegate.swift b/ios/Runner/AppDelegate.swift index 6266644..12c141c 100644 --- a/ios/Runner/AppDelegate.swift +++ b/ios/Runner/AppDelegate.swift @@ -1,5 +1,6 @@ import Flutter import UIKit +import GoogleMaps @main @objc class AppDelegate: FlutterAppDelegate { @@ -7,6 +8,7 @@ import UIKit _ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]? ) -> Bool { + GMSServices.provideAPIKey("AIzaSyDoflpihvRWaQx18SKMu8_fgirF0muW4yU") GeneratedPluginRegistrant.register(with: self) return super.application(application, didFinishLaunchingWithOptions: launchOptions) } diff --git a/lib/components/group/group_content.dart b/lib/components/group/group_content.dart index 3aaff9b..547c407 100644 --- a/lib/components/group/group_content.dart +++ b/lib/components/group/group_content.dart @@ -6,8 +6,8 @@ class GroupContent extends StatelessWidget { @override Widget build(BuildContext context) { return Scaffold( - appBar: AppBar(title: const Text('Group Page')), - body: const Center(child: Text('This is the Group Page')), + appBar: AppBar(title: const Text('Chat Group Page')), + body: const Center(child: Text('This is the Chat Group Page')), ); } } diff --git a/lib/components/map/map_content.dart b/lib/components/map/map_content.dart index cc7b517..37c7aed 100644 --- a/lib/components/map/map_content.dart +++ b/lib/components/map/map_content.dart @@ -1,23 +1,52 @@ import 'package:flutter/material.dart'; +import 'package:google_maps_flutter/google_maps_flutter.dart'; -class MapContent extends StatelessWidget { +class MapContent extends StatefulWidget { const MapContent({super.key}); + @override + State createState() => _MapContentState(); +} + +class _MapContentState extends State { + static LatLng _pGooglePlex = LatLng(50.64864814740268, 3.7224066213297293); + @override Widget build(BuildContext context) { - return Center( - child: Column( - mainAxisAlignment: MainAxisAlignment.center, - children: [ - Icon(Icons.map, size: 80, color: Colors.green), - SizedBox(height: 20), - Text( - 'Page de la Carte', - style: TextStyle(fontSize: 24, fontWeight: FontWeight.bold), + return Scaffold( + body: SafeArea( + child: Padding( + padding: EdgeInsets.all(8.0), + child: Column( + children: [ + TextField( + decoration: InputDecoration( + hintText: 'Rechercher un lieu', + prefixIcon: Icon(Icons.search), + border: OutlineInputBorder( + borderRadius: BorderRadius.circular(8.0), + ), + ), + ), + SizedBox(height: 8.0), + Expanded( + child: GoogleMap( + initialCameraPosition: CameraPosition( + target: _pGooglePlex, + zoom: 14.4746, + ), + markers: { + Marker( + markerId: MarkerId('googlePlex'), + position: _pGooglePlex, + infoWindow: InfoWindow(title: 'Google Plex'), + ), + }, + ), + ), + ], ), - SizedBox(height: 10), - Text('Ici sera intégrée Google Maps'), - ], + ), ), ); } diff --git a/lib/pages/home.dart b/lib/pages/home.dart index ce4df11..f09b488 100644 --- a/lib/pages/home.dart +++ b/lib/pages/home.dart @@ -30,7 +30,7 @@ class _HomePageState extends State { 'Mes voyages', // 0 'Paramètres', // 1 'Carte', // 2 - 'Mes chats', // 3 + 'Chat de groupe', // 3 'Comptes', // 4 ]; @@ -88,7 +88,7 @@ class _HomePageState extends State { ), ListTile( leading: Icon(Icons.group), - title: Text("Mes groupes"), + title: Text("Chat de groupe"), selected: _currentIndex == 3, onTap: () { setState(() { diff --git a/pubspec.lock b/pubspec.lock index 4ad9f61..a3c52f0 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -49,6 +49,14 @@ packages: url: "https://pub.dev" source: hosted version: "1.19.1" + csslib: + dependency: transitive + description: + name: csslib + sha256: "09bad715f418841f976c77db72d5398dc1253c21fb9c0c7f0b0b985860b2d58e" + url: "https://pub.dev" + source: hosted + version: "1.0.2" cupertino_icons: dependency: "direct main" description: @@ -94,6 +102,14 @@ packages: url: "https://pub.dev" source: hosted version: "5.0.0" + flutter_plugin_android_lifecycle: + dependency: transitive + description: + name: flutter_plugin_android_lifecycle + sha256: b0694b7fb1689b0e6cc193b3f1fcac6423c4f93c74fb20b806c6b6f196db0c31 + url: "https://pub.dev" + source: hosted + version: "2.0.30" flutter_test: dependency: "direct dev" description: flutter @@ -104,6 +120,62 @@ packages: description: flutter source: sdk version: "0.0.0" + google_maps: + dependency: transitive + description: + name: google_maps + sha256: "5d410c32112d7c6eb7858d359275b2aa04778eed3e36c745aeae905fb2fa6468" + url: "https://pub.dev" + source: hosted + version: "8.2.0" + google_maps_flutter: + dependency: "direct main" + description: + name: google_maps_flutter + sha256: c389e16fafc04b37a4105e0757ecb9d59806026cee72f408f1ba68811d01bfe6 + url: "https://pub.dev" + source: hosted + version: "2.13.1" + google_maps_flutter_android: + dependency: transitive + description: + name: google_maps_flutter_android + sha256: a6c9d43f6a944ff4bae5c3deb34817970ac3d591dcd7f5bd2ea450ab9e9c514a + url: "https://pub.dev" + source: hosted + version: "2.18.2" + google_maps_flutter_ios: + dependency: transitive + description: + name: google_maps_flutter_ios + sha256: ca02463b19a9abc7d31fcaf22631d021d647107467f741b917a69fa26659fd75 + url: "https://pub.dev" + source: hosted + version: "2.15.5" + google_maps_flutter_platform_interface: + dependency: transitive + description: + name: google_maps_flutter_platform_interface + sha256: f4b9b44f7b12a1f6707ffc79d082738e0b7e194bf728ee61d2b3cdf5fdf16081 + url: "https://pub.dev" + source: hosted + version: "2.14.0" + google_maps_flutter_web: + dependency: transitive + description: + name: google_maps_flutter_web + sha256: "53e5dbf73ff04153acc55a038248706967c21d5b6ef6657a57fce2be73c2895a" + url: "https://pub.dev" + source: hosted + version: "0.5.14+2" + html: + dependency: transitive + description: + name: html + sha256: "6d1264f2dffa1b1101c25a91dff0dc2daee4c18e87cd8538729773c073dbf602" + url: "https://pub.dev" + source: hosted + version: "0.15.6" leak_tracker: dependency: transitive description: @@ -248,6 +320,14 @@ packages: url: "https://pub.dev" source: hosted version: "6.1.5+1" + sanitize_html: + dependency: transitive + description: + name: sanitize_html + sha256: "12669c4a913688a26555323fb9cec373d8f9fbe091f2d01c40c723b33caa8989" + url: "https://pub.dev" + source: hosted + version: "2.1.0" shared_preferences: dependency: "direct main" description: @@ -333,6 +413,14 @@ packages: url: "https://pub.dev" source: hosted version: "2.1.4" + stream_transform: + dependency: transitive + description: + name: stream_transform + sha256: ad47125e588cfd37a9a7f86c7d6356dde8dfe89d071d293f80ca9e9273a33871 + url: "https://pub.dev" + source: hosted + version: "2.1.1" string_scanner: dependency: transitive description: diff --git a/pubspec.yaml b/pubspec.yaml index a455f72..5c15b36 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -38,6 +38,7 @@ dependencies: # The following adds the Cupertino Icons font to your application. # Use with the CupertinoIcons class for iOS style icons. cupertino_icons: ^1.0.8 + google_maps_flutter: ^2.13.1 dev_dependencies: flutter_test: