fix: show theme preview in incognito without network loading

This commit is contained in:
julian 2023-05-12 14:13:15 -06:00
parent 4a5ca30b6f
commit 451e5e1259

View file

@ -196,22 +196,22 @@ class _StackThemeCardState extends ConsumerState<StackThemeCard> {
)
: Builder(
builder: (context) {
final incognitoFile = ref.watch(
final themePreview = ref.watch(
themeProvider.select(
(value) => value.assets.personaIncognito,
(value) => value.assets.themePreview,
),
);
return (incognitoFile.endsWith(".png"))
return (themePreview.endsWith(".png"))
? Image.file(
File(
incognitoFile,
themePreview,
),
height: 100,
)
: SvgPicture.file(
File(
incognitoFile,
themePreview,
),
height: 100,
);