ecra de mapa adicionado

This commit is contained in:
2026-02-25 15:20:42 +00:00
parent 803bc197d4
commit bbd6185401
19 changed files with 564 additions and 60 deletions

View File

@@ -0,0 +1,34 @@
import 'package:flutter/material.dart';
import 'package:google_maps_flutter/google_maps_flutter.dart';
class GoogleMapScreen extends StatefulWidget {
const GoogleMapScreen({super.key});
@override
State<GoogleMapScreen> createState() => _GoogleMapScreenState();
}
class _GoogleMapScreenState extends State<GoogleMapScreen> {
late GoogleMapController mapController;
final LatLng _center = const LatLng(38.7223, -9.1393); // Lisbon coordinates
void _onMapCreated(GoogleMapController controller) {
mapController = controller;
}
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
title: const Text('Mapa da Corrida'),
backgroundColor: Colors.black, // or your AppColors.background
elevation: 0,
),
body: GoogleMap(
onMapCreated: _onMapCreated,
initialCameraPosition: CameraPosition(target: _center, zoom: 13.0),
),
);
}
}