fix : onTap marker

This commit is contained in:
2025-04-15 13:33:26 +03:30
parent 1a31d4cdbf
commit a754ac6873
9 changed files with 123 additions and 52 deletions

View File

@@ -19,31 +19,51 @@ SvgPicture vecWidget(
);
}
Widget vecWidgetWithOnTap({
required String assets,
required VoidCallback onTap,
double? width,
double? height,
BoxFit? fit,
Color? color,
}) {
return InkWell(
onTap: onTap,
child: SvgPicture(
AssetBytesLoader(assets),
width: width,
height: height,
fit: fit ?? BoxFit.contain,
colorFilter:
color != null ? ColorFilter.mode(color, BlendMode.srcIn) : null,
),
);
}
SvgPicture svgWidget(
String assets, {
double? width,
double? height,
BoxFit? fit,
Color? color,
}) {
String assets, {
double? width,
double? height,
BoxFit? fit,
Color? color,
}) {
return SvgPicture.asset(
assets,
width: width,
height: height,
fit: fit ?? BoxFit.contain,
colorFilter:
color != null ? ColorFilter.mode(color, BlendMode.srcIn) : null,
color != null ? ColorFilter.mode(color, BlendMode.srcIn) : null,
);
}
Widget vecWidget2(
String assets, {
double? width,
double? height,
BoxFit? fit,
Color? color,
}) {
String assets, {
double? width,
double? height,
BoxFit? fit,
Color? color,
}) {
final resolvedColor = WidgetStateProperty.resolveWith<Color?>((states) {
if (states.contains(WidgetState.pressed)) {
return Colors.white;
@@ -58,9 +78,10 @@ Widget vecWidget2(
width: width,
height: height,
fit: fit ?? BoxFit.contain,
colorFilter: resolvedColor != null
? ColorFilter.mode(resolvedColor, BlendMode.srcIn)
: null,
colorFilter:
resolvedColor != null
? ColorFilter.mode(resolvedColor, BlendMode.srcIn)
: null,
),
);
}