mirror of
https://gitlab.com/nkming2/nc-photos.git
synced 2025-02-08 18:28:53 +01:00
Fix google maps marker hacing different size on different screen size
This commit is contained in:
parent
da8af5db07
commit
f33d6f0744
1 changed files with 3 additions and 2 deletions
|
@ -93,12 +93,13 @@ class _GoogleMarkerBuilder extends _MarkerBuilder {
|
||||||
});
|
});
|
||||||
|
|
||||||
Future<BitmapDescriptor> build(List<_DataPoint> dataPoints) async {
|
Future<BitmapDescriptor> build(List<_DataPoint> dataPoints) async {
|
||||||
|
final size = MediaQuery.sizeOf(context);
|
||||||
return _GoogleMarkerBitmapBuilder(
|
return _GoogleMarkerBitmapBuilder(
|
||||||
imagePath: await _getImagePath(dataPoints),
|
imagePath: await _getImagePath(dataPoints),
|
||||||
size: _getMarkerSize(dataPoints.length),
|
size: _getMarkerSize(dataPoints.length) / 450 * size.width,
|
||||||
color: Theme.of(context).colorScheme.primaryContainer,
|
color: Theme.of(context).colorScheme.primaryContainer,
|
||||||
text: _getMarkerCountString(dataPoints.length),
|
text: _getMarkerCountString(dataPoints.length),
|
||||||
textSize: _getMarkerTextSize(dataPoints.length),
|
textSize: _getMarkerTextSize(dataPoints.length) / 450 * size.width,
|
||||||
textColor: Theme.of(context).colorScheme.onPrimaryContainer,
|
textColor: Theme.of(context).colorScheme.onPrimaryContainer,
|
||||||
).build();
|
).build();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue