Created
December 4, 2021 17:02
-
-
Save berkayoruc/a77f67ff846dc81c6a146b5d8962e866 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
List<BuffetMarker> getMarkers(List<Buffet>? buffets) { | |
return buffets! | |
.map<BuffetMarker>((e) => BuffetMarker( | |
builder: (ctx) => buildMarker(), | |
name: e.name, | |
district: e.district, | |
neighborhood: e.neighborhood, | |
anchorPos: AnchorPos.align(AnchorAlign.center), | |
point: LatLng(double.parse(e.latitude.replaceAll(' ', '')), | |
double.parse(e.longitude.replaceAll(' ', ''))))) | |
.toList(); | |
} | |
FloatingActionButton buildMarker() { | |
return const FloatingActionButton( | |
heroTag: null, | |
onPressed: null, | |
backgroundColor: Colors.deepOrangeAccent, | |
child: Icon( | |
Icons.location_on, | |
color: Colors.white, | |
)); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment