Add Google Maps integration and update UI components; change platform version and minimum SDK
This commit is contained in:
@@ -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')),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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<MapContent> createState() => _MapContentState();
|
||||
}
|
||||
|
||||
class _MapContentState extends State<MapContent> {
|
||||
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'),
|
||||
],
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
@@ -30,7 +30,7 @@ class _HomePageState extends State<HomePage> {
|
||||
'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<HomePage> {
|
||||
),
|
||||
ListTile(
|
||||
leading: Icon(Icons.group),
|
||||
title: Text("Mes groupes"),
|
||||
title: Text("Chat de groupe"),
|
||||
selected: _currentIndex == 3,
|
||||
onTap: () {
|
||||
setState(() {
|
||||
|
||||
Reference in New Issue
Block a user