support logo.png

This commit is contained in:
rustdesk
2024-02-26 17:49:12 +08:00
parent 2920e33d71
commit 749a1d2da2
3 changed files with 15 additions and 11 deletions

View File

@@ -3071,3 +3071,14 @@ Color? disabledTextColor(BuildContext context, bool enabled) {
? null
: Theme.of(context).textTheme.titleLarge?.color?.withOpacity(0.6);
}
Widget loadLogo(double size) {
return Image.asset('assets/logo.png',
width: size,
height: size,
errorBuilder: (ctx, error, stackTrace) => SvgPicture.asset(
'assets/logo.svg',
width: size,
height: size,
));
}