in packages/google_maps_flutter/google_maps_flutter/example/lib/place_polyline.dart [203:307]
Widget build(BuildContext context) {
final bool isIOS = !kIsWeb && defaultTargetPlatform == TargetPlatform.iOS;
final PolylineId? selectedId = selectedPolyline;
return Column(
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
crossAxisAlignment: CrossAxisAlignment.stretch,
children: <Widget>[
Center(
child: SizedBox(
width: 350.0,
height: 300.0,
child: GoogleMap(
initialCameraPosition: const CameraPosition(
target: LatLng(53.1721, -3.5402),
zoom: 7.0,
),
polylines: Set<Polyline>.of(polylines.values),
onMapCreated: _onMapCreated,
),
),
),
Expanded(
child: SingleChildScrollView(
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
children: <Widget>[
Row(
children: <Widget>[
Column(
children: <Widget>[
TextButton(
child: const Text('add'),
onPressed: _add,
),
TextButton(
child: const Text('remove'),
onPressed: (selectedId == null)
? null
: () => _remove(selectedId),
),
TextButton(
child: const Text('toggle visible'),
onPressed: (selectedId == null)
? null
: () => _toggleVisible(selectedId),
),
TextButton(
child: const Text('toggle geodesic'),
onPressed: (selectedId == null)
? null
: () => _toggleGeodesic(selectedId),
),
],
),
Column(
children: <Widget>[
TextButton(
child: const Text('change width'),
onPressed: (selectedId == null)
? null
: () => _changeWidth(selectedId),
),
TextButton(
child: const Text('change color'),
onPressed: (selectedId == null)
? null
: () => _changeColor(selectedId),
),
TextButton(
child: const Text('change start cap [Android only]'),
onPressed: isIOS || (selectedId == null)
? null
: () => _changeStartCap(selectedId),
),
TextButton(
child: const Text('change end cap [Android only]'),
onPressed: isIOS || (selectedId == null)
? null
: () => _changeEndCap(selectedId),
),
TextButton(
child: const Text('change joint type [Android only]'),
onPressed: isIOS || (selectedId == null)
? null
: () => _changeJointType(selectedId),
),
TextButton(
child: const Text('change pattern [Android only]'),
onPressed: isIOS || (selectedId == null)
? null
: () => _changePattern(selectedId),
),
],
)
],
)
],
),
),
),
],
);
}