@override Widget build(BuildContext context) {
return Scaffold(
body: SafeArea(
top: false,
child: Stack(
children: <Widget>[
GoogleMap(
myLocationEnabled: true,
myLocationButtonEnabled: false,
mapType: MapType.normal,
initialCameraPosition: _kGooglePlex,
mapToolbarEnabled: false,
onMapCreated: (GoogleMapController controller) {
_controller.complete(controller);
},
onTap: (position) {
setState(() {
_markers = <Marker>[
Marker(
markerId: MarkerId('marker'),
position: LatLng(position.latitude, position.longitude),
draggable: true,
),
];
});
print(position.latitude);
print(position.longitude);
},
markers: _markers.length > 0 ? _markers.toSet() : null,
onCameraMove: (cameraPosition) {},
),
Positioned(
top: 0,
child: Container(
padding: EdgeInsets.only(top: 14),
width: MediaQuery.of(context).size.width,
decoration: BoxDecoration(
gradient: LinearGradient(
colors: <Color>[Color(0xFF68BB49), Colors.transparent],
begin: Alignment.topCenter,
end: Alignment.bottomCenter,
),
),
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: <Widget>[
IconButton(
onPressed: () {
Navigator.pop(context);
},
icon: Icon(
Icons.arrow_back_ios,
color: Color(0xFF68BB49),
),
),
Text(
'Карта',
style: TextStyle(
fontSize: 18,
color: Color(0xFF68BB49),
),
),
Container(
width: 50,
),
],
),
),
),
],
),
),
floatingActionButton: FloatingActionButton(
child: Icon(Icons.my_location),
onPressed: _findLocation,
),
bottomSheet: AnimatedContainer(
curve: Curves.easeIn,
duration: Duration(milliseconds: 100),
height: 230,
width: MediaQuery.of(context).size.width,
child: Column(
children: <Widget>[
Padding(
padding: const EdgeInsets.only(
top: 16.0,
right: 16.0,
bottom: 0,
left: 16.0,
),
child: Text(
'Место проведения работы',
style: TextStyle(
fontSize: 16.0,
),
),
),
RadioListTile(
controlAffinity: ListTileControlAffinity.trailing,
activeColor: Color(0xFF00AE68),
title: Text(
'Территория заказчика',
style: TextStyle(
fontSize: 18.0,
color: Color(0xFF68BB49),
),
),
value: false,
groupValue: isRemote,
onChanged: (bool value) {
print(value);
setState(() {
isRemote = value;
});
},
),
RadioListTile(
controlAffinity: ListTileControlAffinity.trailing,
activeColor: Color(0xFF00AE68),
title: Text(
'Удаленно',
style: TextStyle(