mapa mas pequeño

This commit is contained in:
Felipe
2023-09-01 19:11:46 -05:00
parent 0d1a06bcf9
commit 3a6db40866
+31 -21
View File
@@ -599,14 +599,12 @@ class _ServiceScreenState extends State<ServiceScreen> {
child: Scaffold(
backgroundColor: const Color(0xFFD6F4FF),
drawer: DrawerMenu(),
body: SingleChildScrollView(
reverse: true,
child: Column(
body: Column(
children: [
Stack(
children: [
SizedBox(
height: MediaQuery.of(context).size.height * 0.6,
height: MediaQuery.of(context).size.height * 0.5,
child: GoogleMap(
mapType: MapType.normal,
initialCameraPosition: initialCameraPosition,
@@ -633,8 +631,7 @@ class _ServiceScreenState extends State<ServiceScreen> {
coordinates = position.target;
});
},
gestureRecognizers: <Factory<
OneSequenceGestureRecognizer>>{
gestureRecognizers: <Factory<OneSequenceGestureRecognizer>>{
Factory<OneSequenceGestureRecognizer>(
() => EagerGestureRecognizer(),
),
@@ -713,12 +710,14 @@ class _ServiceScreenState extends State<ServiceScreen> {
),
],
),
Container(
Expanded(
child: SingleChildScrollView(
child: Container(
width: double.infinity,
height: MediaQuery.of(context).size.height * 0.5,
decoration: const BoxDecoration(color: Colors.white),
child: Column(
children: [
const SizedBox(height: 5),
SizedBox(
width: 320,
child: Form(
@@ -741,12 +740,14 @@ class _ServiceScreenState extends State<ServiceScreen> {
if (serviceType != null) {
setState(() {
_serviceType = serviceType;
_serviceTypeController.text = _serviceType;
_serviceTypeController.text =
_serviceType;
});
}
},
decoration: const InputDecoration(
prefixIcon: Icon(Icons.room_service_rounded),
prefixIcon:
Icon(Icons.room_service_rounded),
suffixIcon: Icon(Icons.arrow_drop_down),
hintText: 'Tipo de Servicio'),
),
@@ -757,7 +758,8 @@ class _ServiceScreenState extends State<ServiceScreen> {
controller: _profesionalController,
readOnly: true,
onTap: () async {
final dynamic datos = await Navigator.push(
final dynamic datos =
await Navigator.push(
context,
CupertinoPageRoute(
builder: (BuildContext context) {
@@ -802,12 +804,16 @@ class _ServiceScreenState extends State<ServiceScreen> {
_locationController.text =
profesional.realAddress;
if (professionalLatitude != null &&
if (professionalLatitude !=
null &&
professionalLatitude != 0 &&
professionalLongitude != null &&
professionalLongitude !=
null &&
professionalLongitude != 0) {
googleMapController.animateCamera(
CameraUpdate.newCameraPosition(
googleMapController
.animateCamera(
CameraUpdate
.newCameraPosition(
CameraPosition(
target: LatLng(
professionalLatitude!,
@@ -852,7 +858,8 @@ class _ServiceScreenState extends State<ServiceScreen> {
itemBuilder: (context, index) {
return ListTile(
onTap: () {
final selectedAddress = _placesList[index]
final selectedAddress =
_placesList[index]
['formatted_address'];
final selectedLatitude =
_placesList[index]['geometry']
@@ -865,9 +872,11 @@ class _ServiceScreenState extends State<ServiceScreen> {
selectedAddress;
final newCoordinates = LatLng(
selectedLatitude, selectedLongitude);
selectedLatitude,
selectedLongitude);
googleMapController.animateCamera(
CameraUpdate.newLatLng(newCoordinates),
CameraUpdate.newLatLng(
newCoordinates),
);
setState(() {
@@ -923,7 +932,8 @@ class _ServiceScreenState extends State<ServiceScreen> {
controller: TextEditingController(
text: _selectedDate == null
? ''
: formatter.format(_selectedDate!)),
: formatter
.format(_selectedDate!)),
),
),
SizedBox(
@@ -1069,7 +1079,6 @@ class _ServiceScreenState extends State<ServiceScreen> {
),
),
),
const SizedBox(height: 15),
],
),
),
@@ -1077,9 +1086,10 @@ class _ServiceScreenState extends State<ServiceScreen> {
],
),
),
],
),
),
],
),
),
);
}