fix: token view summary icon asset loading

This commit is contained in:
julian 2023-05-15 16:31:03 -06:00
parent 9732b395ef
commit ba33aee395

View file

@ -308,14 +308,23 @@ class TokenOptionsButton extends StatelessWidget {
child: child,
),
),
child: SvgPicture.file(
File(iconAssetPathSVG),
color: Theme.of(context)
.extension<StackColors>()!
.tokenSummaryIcon,
width: iconSize,
height: iconSize,
),
child: iconAssetPathSVG.startsWith("assets/")
? SvgPicture.asset(
iconAssetPathSVG,
color: Theme.of(context)
.extension<StackColors>()!
.tokenSummaryIcon,
width: iconSize,
height: iconSize,
)
: SvgPicture.file(
File(iconAssetPathSVG),
color: Theme.of(context)
.extension<StackColors>()!
.tokenSummaryIcon,
width: iconSize,
height: iconSize,
),
),
),
),