defaultMarkerBuilder function
Implementation
Widget defaultMarkerBuilder(SimpleMapMarker m, Offset offset) {
const border = 1.4;
final width = m.radius * 2;
final size = Size(width, width * 1.21);
return Positioned(
top: offset.dy - size.height + 0.6,
left: offset.dx - m.radius - 0.2,
child: Stack(
clipBehavior: Clip.none,
alignment: Alignment.topCenter,
children: [
CustomPaint(
painter: SimpleMarkerPainter(color: m.color),
size: size,
),
Container(
width: size.width - border * 2,
height: size.width - border * 2,
margin: const EdgeInsets.only(top: border),
decoration: BoxDecoration(
image: m.image != null
? DecorationImage(image: m.image!, fit: BoxFit.cover)
: null,
shape: BoxShape.circle,
color: _kColorWhite.withOpacity(0.7),
),
)
],
),
);
}