fix : onTap marker
This commit is contained in:
@@ -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,
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user