getFeatureColor static method

Color getFeatureColor(
  1. MapDataSource dataSource,
  2. MapFeature feature,
  3. MapTheme theme,
  4. MapHighlightTheme? highlightTheme,
)

Gets the feature color.

Implementation

static Color getFeatureColor(MapDataSource dataSource, MapFeature feature,
    MapTheme theme, MapHighlightTheme? highlightTheme) {
  Color? color = highlightTheme?.color;
  if (color == null) {
    color = theme.getColor(dataSource, feature);
  }
  if (color != null) {
    return color;
  }
  return MapTheme.defaultColor;
}