support logo.png
This commit is contained in:
parent
2920e33d71
commit
749a1d2da2
@ -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,
|
||||
));
|
||||
}
|
||||
|
@ -327,11 +327,7 @@ class _AppIcon extends StatelessWidget {
|
||||
Widget build(BuildContext context) {
|
||||
return Container(
|
||||
margin: EdgeInsets.symmetric(horizontal: 4.0),
|
||||
child: SvgPicture.asset(
|
||||
'assets/logo.svg',
|
||||
width: 30,
|
||||
height: 30,
|
||||
),
|
||||
child: loadLogo(30),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
@ -399,12 +399,9 @@ class DesktopTab extends StatelessWidget {
|
||||
offstage: kUseCompatibleUiMode || Platform.isMacOS,
|
||||
child: Row(children: [
|
||||
Offstage(
|
||||
offstage: !showLogo,
|
||||
child: SvgPicture.asset(
|
||||
'assets/logo.svg',
|
||||
width: 16,
|
||||
height: 16,
|
||||
)),
|
||||
offstage: !showLogo,
|
||||
child: loadLogo(16),
|
||||
),
|
||||
Offstage(
|
||||
offstage: !showTitle,
|
||||
child: const Text(
|
||||
|
Loading…
x
Reference in New Issue
Block a user