chore: code lint

This commit is contained in:
kuloud
2025-03-12 11:03:18 +08:00
parent 7cd7360eb8
commit 19c0c3bae6
21 changed files with 164 additions and 140 deletions

View File

@ -96,12 +96,12 @@ class Marker extends BaseOverlay {
(alpha != null ? (alpha < 0 ? 0 : (alpha > 1 ? 1 : alpha)) : alpha),
// ignore: unnecessary_null_comparison
anchor = (anchor == null
? Offset(0.5, 1.0)
? const Offset(0.5, 1.0)
: ((anchor.dx < 0 ||
anchor.dx > 1 ||
anchor.dy < 0 ||
anchor.dy > 1)
? Offset(0.5, 1.0)
? const Offset(0.5, 1.0)
: anchor)),
super();

View File

@ -77,8 +77,8 @@ class Polygon extends BaseOverlay {
addIfPresent('id', id);
json['points'] = _pointsToJson();
addIfPresent('strokeWidth', strokeWidth);
addIfPresent('strokeColor', strokeColor.value);
addIfPresent('fillColor', fillColor.value);
addIfPresent('strokeColor', strokeColor.toARGB32());
addIfPresent('fillColor', fillColor.toARGB32());
addIfPresent('visible', visible);
addIfPresent('joinType', joinType.index);
return json;

View File

@ -155,7 +155,7 @@ class Polyline extends BaseOverlay {
addIfPresent('capType', capType.index);
addIfPresent('joinType', joinType.index);
addIfPresent('customTexture', customTexture?.toMap());
addIfPresent('color', color.value);
addIfPresent('color', color.toARGB32());
return json;
}

View File

@ -167,8 +167,8 @@ class MyLocationStyleOptions {
}
addIfPresent('enabled', enabled);
addIfPresent('circleFillColor', circleFillColor?.value);
addIfPresent('circleStrokeColor', circleStrokeColor?.value);
addIfPresent('circleFillColor', circleFillColor?.toARGB32());
addIfPresent('circleStrokeColor', circleStrokeColor?.toARGB32());
addIfPresent('circleStrokeWidth', circleStrokeWidth);
addIfPresent('icon', icon?.toMap());
return json;