fix : onTap marker
This commit is contained in:
@@ -17,7 +17,7 @@ class Assets {
|
||||
static const String iconsProfileCircle = 'assets/icons/profile_circle.svg';
|
||||
static const String iconsScan = 'assets/icons/scan.svg';
|
||||
static const String iconsScanBarcode = 'assets/icons/scan_barcode.svg';
|
||||
static const String iconsSecurityTime = 'assets/icons/security-time.svg';
|
||||
static const String iconsSecurityTime = 'assets/icons/security_time.svg';
|
||||
static const String iconsSetting = 'assets/icons/setting.svg';
|
||||
static const String iconsTrash = 'assets/icons/trash.svg';
|
||||
static const String imagesInnerSplash = 'assets/images/inner_splash.webp';
|
||||
@@ -37,7 +37,7 @@ class Assets {
|
||||
static const String vecProfileCircleSvg = 'assets/vec/profile_circle.svg.vec';
|
||||
static const String vecScanBarcodeSvg = 'assets/vec/scan_barcode.svg.vec';
|
||||
static const String vecScanSvg = 'assets/vec/scan.svg.vec';
|
||||
static const String vecSecurityTimeSvg = 'assets/vec/security-time.svg.vec';
|
||||
static const String vecSecurityTimeSvg = 'assets/vec/security_time.svg.vec';
|
||||
static const String vecSettingSvg = 'assets/vec/setting.svg.vec';
|
||||
static const String vecTrashSvg = 'assets/vec/trash.svg.vec';
|
||||
|
||||
|
||||
@@ -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