Add Google Maps integration and update UI components; change platform version and minimum SDK

This commit is contained in:
Van Leemput Dayron
2025-10-05 16:33:24 +02:00
parent 02754f3506
commit da39e0e164
12 changed files with 846 additions and 20 deletions

View File

@@ -24,7 +24,7 @@ android {
applicationId = "com.example.travel_mate" applicationId = "com.example.travel_mate"
// You can update the following values to match your application needs. // You can update the following values to match your application needs.
// For more information, see: https://flutter.dev/to/review-gradle-config. // For more information, see: https://flutter.dev/to/review-gradle-config.
minSdk = flutter.minSdkVersion minSdkVersion 21
targetSdk = flutter.targetSdkVersion targetSdk = flutter.targetSdkVersion
versionCode = flutter.versionCode versionCode = flutter.versionCode
versionName = flutter.versionName versionName = flutter.versionName

View File

@@ -30,6 +30,9 @@
<meta-data <meta-data
android:name="flutterEmbedding" android:name="flutterEmbedding"
android:value="2" /> android:value="2" />
<meta-data
android:name="com.google.android.geo.API_KEY"
android:value="AIzaSyAAQd5UqtPc0fsbHnuezm22r9b5dgzv21Y"/>
</application> </application>
<!-- Required to query activities that can process text, see: <!-- Required to query activities that can process text, see:
https://developer.android.com/training/package-visibility and https://developer.android.com/training/package-visibility and

File diff suppressed because one or more lines are too long

View File

@@ -1,5 +1,5 @@
# Uncomment this line to define a global platform for your project # 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. # CocoaPods analytics sends network stats synchronously affecting flutter build latency.
ENV['COCOAPODS_DISABLE_STATS'] = 'true' ENV['COCOAPODS_DISABLE_STATS'] = 'true'

View File

@@ -1,5 +1,16 @@
PODS: PODS:
- Flutter (1.0.0) - 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): - path_provider_foundation (0.0.1):
- Flutter - Flutter
- FlutterMacOS - FlutterMacOS
@@ -9,12 +20,20 @@ PODS:
DEPENDENCIES: DEPENDENCIES:
- Flutter (from `Flutter`) - 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`) - path_provider_foundation (from `.symlinks/plugins/path_provider_foundation/darwin`)
- shared_preferences_foundation (from `.symlinks/plugins/shared_preferences_foundation/darwin`) - shared_preferences_foundation (from `.symlinks/plugins/shared_preferences_foundation/darwin`)
SPEC REPOS:
trunk:
- Google-Maps-iOS-Utils
- GoogleMaps
EXTERNAL SOURCES: EXTERNAL SOURCES:
Flutter: Flutter:
:path: Flutter :path: Flutter
google_maps_flutter_ios:
:path: ".symlinks/plugins/google_maps_flutter_ios/ios"
path_provider_foundation: path_provider_foundation:
:path: ".symlinks/plugins/path_provider_foundation/darwin" :path: ".symlinks/plugins/path_provider_foundation/darwin"
shared_preferences_foundation: shared_preferences_foundation:
@@ -22,9 +41,12 @@ EXTERNAL SOURCES:
SPEC CHECKSUMS: SPEC CHECKSUMS:
Flutter: cabc95a1d2626b1b06e7179b784ebcf0c0cde467 Flutter: cabc95a1d2626b1b06e7179b784ebcf0c0cde467
Google-Maps-iOS-Utils: 66d6de12be1ce6d3742a54661e7a79cb317a9321
google_maps_flutter_ios: 0291eb2aa252298a769b04d075e4a9d747ff7264
GoogleMaps: 8939898920281c649150e0af74aa291c60f2e77d
path_provider_foundation: 080d55be775b7414fd5a5ef3ac137b97b097e564 path_provider_foundation: 080d55be775b7414fd5a5ef3ac137b97b097e564
shared_preferences_foundation: 9e1978ff2562383bd5676f64ec4e9aa8fa06a6f7 shared_preferences_foundation: 9e1978ff2562383bd5676f64ec4e9aa8fa06a6f7
PODFILE CHECKSUM: 3c63482e143d1b91d2d2560aee9fb04ecc74ac7e PODFILE CHECKSUM: e30f02f9d1c72c47bb6344a0a748c9d268180865
COCOAPODS: 1.16.2 COCOAPODS: 1.16.2

View File

@@ -199,6 +199,7 @@
9705A1C41CF9048500538489 /* Embed Frameworks */, 9705A1C41CF9048500538489 /* Embed Frameworks */,
3B06AD1E1E4923F5004D2608 /* Thin Binary */, 3B06AD1E1E4923F5004D2608 /* Thin Binary */,
457D4D342621FBD6E3ADE104 /* [CP] Embed Pods Frameworks */, 457D4D342621FBD6E3ADE104 /* [CP] Embed Pods Frameworks */,
98675331487986E21AE48EE3 /* [CP] Copy Pods Resources */,
); );
buildRules = ( buildRules = (
); );
@@ -362,6 +363,23 @@
shellPath = /bin/sh; shellPath = /bin/sh;
shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" build"; 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 */ /* End PBXShellScriptBuildPhase section */
/* Begin PBXSourcesBuildPhase section */ /* Begin PBXSourcesBuildPhase section */

View File

@@ -1,5 +1,6 @@
import Flutter import Flutter
import UIKit import UIKit
import GoogleMaps
@main @main
@objc class AppDelegate: FlutterAppDelegate { @objc class AppDelegate: FlutterAppDelegate {
@@ -7,6 +8,7 @@ import UIKit
_ application: UIApplication, _ application: UIApplication,
didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]? didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?
) -> Bool { ) -> Bool {
GMSServices.provideAPIKey("AIzaSyDoflpihvRWaQx18SKMu8_fgirF0muW4yU")
GeneratedPluginRegistrant.register(with: self) GeneratedPluginRegistrant.register(with: self)
return super.application(application, didFinishLaunchingWithOptions: launchOptions) return super.application(application, didFinishLaunchingWithOptions: launchOptions)
} }

View File

@@ -6,8 +6,8 @@ class GroupContent extends StatelessWidget {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return Scaffold( return Scaffold(
appBar: AppBar(title: const Text('Group Page')), appBar: AppBar(title: const Text('Chat Group Page')),
body: const Center(child: Text('This is the Group Page')), body: const Center(child: Text('This is the Chat Group Page')),
); );
} }
} }

View File

@@ -1,24 +1,53 @@
import 'package:flutter/material.dart'; 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}); const MapContent({super.key});
@override
State<MapContent> createState() => _MapContentState();
}
class _MapContentState extends State<MapContent> {
static LatLng _pGooglePlex = LatLng(50.64864814740268, 3.7224066213297293);
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return Center( return Scaffold(
body: SafeArea(
child: Padding(
padding: EdgeInsets.all(8.0),
child: Column( child: Column(
mainAxisAlignment: MainAxisAlignment.center,
children: [ children: [
Icon(Icons.map, size: 80, color: Colors.green), TextField(
SizedBox(height: 20), decoration: InputDecoration(
Text( hintText: 'Rechercher un lieu',
'Page de la Carte', prefixIcon: Icon(Icons.search),
style: TextStyle(fontSize: 24, fontWeight: FontWeight.bold), 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'),
], ],
), ),
),
),
); );
} }
} }

View File

@@ -30,7 +30,7 @@ class _HomePageState extends State<HomePage> {
'Mes voyages', // 0 'Mes voyages', // 0
'Paramètres', // 1 'Paramètres', // 1
'Carte', // 2 'Carte', // 2
'Mes chats', // 3 'Chat de groupe', // 3
'Comptes', // 4 'Comptes', // 4
]; ];
@@ -88,7 +88,7 @@ class _HomePageState extends State<HomePage> {
), ),
ListTile( ListTile(
leading: Icon(Icons.group), leading: Icon(Icons.group),
title: Text("Mes groupes"), title: Text("Chat de groupe"),
selected: _currentIndex == 3, selected: _currentIndex == 3,
onTap: () { onTap: () {
setState(() { setState(() {

View File

@@ -49,6 +49,14 @@ packages:
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "1.19.1" version: "1.19.1"
csslib:
dependency: transitive
description:
name: csslib
sha256: "09bad715f418841f976c77db72d5398dc1253c21fb9c0c7f0b0b985860b2d58e"
url: "https://pub.dev"
source: hosted
version: "1.0.2"
cupertino_icons: cupertino_icons:
dependency: "direct main" dependency: "direct main"
description: description:
@@ -94,6 +102,14 @@ packages:
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "5.0.0" 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: flutter_test:
dependency: "direct dev" dependency: "direct dev"
description: flutter description: flutter
@@ -104,6 +120,62 @@ packages:
description: flutter description: flutter
source: sdk source: sdk
version: "0.0.0" 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: leak_tracker:
dependency: transitive dependency: transitive
description: description:
@@ -248,6 +320,14 @@ packages:
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "6.1.5+1" 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: shared_preferences:
dependency: "direct main" dependency: "direct main"
description: description:
@@ -333,6 +413,14 @@ packages:
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "2.1.4" 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: string_scanner:
dependency: transitive dependency: transitive
description: description:

View File

@@ -38,6 +38,7 @@ dependencies:
# The following adds the Cupertino Icons font to your application. # The following adds the Cupertino Icons font to your application.
# Use with the CupertinoIcons class for iOS style icons. # Use with the CupertinoIcons class for iOS style icons.
cupertino_icons: ^1.0.8 cupertino_icons: ^1.0.8
google_maps_flutter: ^2.13.1
dev_dependencies: dev_dependencies:
flutter_test: flutter_test: