Skip to content

Commit

Permalink
Add filterQuality parameter to BaseOverlayImage
Browse files Browse the repository at this point in the history
  • Loading branch information
RBT22 committed Nov 22, 2024
1 parent 89d49d9 commit 77616b5
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions lib/src/layer/overlay_image_layer/overlay_image.dart
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,16 @@ sealed class BaseOverlayImage extends StatelessWidget {
/// (false), when the image provider changes. The default value is false.
final bool gaplessPlayback;

/// The [FilterQuality] of the image, used to define how high quality the
/// overlay image should have on the map.
final FilterQuality filterQuality;

const BaseOverlayImage({
super.key,
required this.imageProvider,
this.opacity = 1,
this.gaplessPlayback = false,
this.filterQuality = FilterQuality.medium,
});

Widget _render(
Expand All @@ -36,6 +41,7 @@ sealed class BaseOverlayImage extends StatelessWidget {
color: Color.fromRGBO(255, 255, 255, opacity),
colorBlendMode: BlendMode.modulate,
gaplessPlayback: gaplessPlayback,
filterQuality: filterQuality,
),
camera: MapCamera.of(context),
);
Expand All @@ -57,6 +63,7 @@ class OverlayImage extends BaseOverlayImage {
required this.bounds,
super.opacity,
super.gaplessPlayback,
super.filterQuality,
});

@override
Expand Down Expand Up @@ -99,10 +106,6 @@ class RotatedOverlayImage extends BaseOverlayImage {
/// The coordinates of the bottom right corner of the image.
final LatLng bottomRightCorner;

/// The [FilterQuality] of the image, used to define how high quality the
/// overlay image should have on the map.
final FilterQuality? filterQuality;

/// Create a new [RotatedOverlayImage] instance that can be provided to the
/// [OverlayImageLayer].
const RotatedOverlayImage({
Expand All @@ -111,7 +114,7 @@ class RotatedOverlayImage extends BaseOverlayImage {
required this.topLeftCorner,
required this.bottomLeftCorner,
required this.bottomRightCorner,
this.filterQuality = FilterQuality.medium,
super.filterQuality,
super.opacity,
super.gaplessPlayback,
});
Expand Down

0 comments on commit 77616b5

Please sign in to comment.