import 'package:flutter/material.dart'; import 'package:google_maps_flutter/google_maps_flutter.dart'; 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 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'), ), }, ), ), ], ), ), ), ); } }