mirror of
https://gitlab.com/nkming2/nc-photos.git
synced 2025-02-02 06:46:22 +01:00
Update marker style
This commit is contained in:
parent
739b23b8ba
commit
877bed1640
1 changed files with 15 additions and 9 deletions
|
@ -131,11 +131,19 @@ class _MapViewState extends State<_MapView> {
|
||||||
r = (count / 10) * step;
|
r = (count / 10) * step;
|
||||||
}
|
}
|
||||||
if (Theme.of(context).brightness == Brightness.light) {
|
if (Theme.of(context).brightness == Brightness.light) {
|
||||||
final tone = (r * 30 + 65).toInt();
|
return HSLColor.fromAHSL(
|
||||||
return Color(_colorTonalPalette.get(tone));
|
1,
|
||||||
|
_colorHsl.hue,
|
||||||
|
r * .8 + .2,
|
||||||
|
(_colorHsl.lightness - (.1 - r * .1)).clamp(0, 1),
|
||||||
|
).toColor();
|
||||||
} else {
|
} else {
|
||||||
final tone = (60 - r * 30).toInt();
|
return HSLColor.fromAHSL(
|
||||||
return Color(_colorTonalPalette.get(tone));
|
1,
|
||||||
|
_colorHsl.hue,
|
||||||
|
r * .65 + .35,
|
||||||
|
(_colorHsl.lightness - (.1 - r * .1)).clamp(0, 1),
|
||||||
|
).toColor();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -154,7 +162,7 @@ class _MapViewState extends State<_MapView> {
|
||||||
default:
|
default:
|
||||||
r = (count / 10) * step;
|
r = (count / 10) * step;
|
||||||
}
|
}
|
||||||
return (r * 50).toInt() + 90;
|
return (r * 85).toInt() + 75;
|
||||||
}
|
}
|
||||||
|
|
||||||
late final _clusterManager = ClusterManager<_DataPoint>(
|
late final _clusterManager = ClusterManager<_DataPoint>(
|
||||||
|
@ -189,8 +197,6 @@ class _MapViewState extends State<_MapView> {
|
||||||
);
|
);
|
||||||
GoogleMapController? _mapController;
|
GoogleMapController? _mapController;
|
||||||
|
|
||||||
late final _colorTonalPalette = () {
|
late final _colorHsl =
|
||||||
final hct = Hct.fromInt(Theme.of(context).colorScheme.primary.value);
|
HSLColor.fromColor(Theme.of(context).colorScheme.primaryContainer);
|
||||||
return FlexTonalPalette.of(hct.hue, hct.chroma);
|
|
||||||
}();
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue