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