mirror of
https://github.com/gabehf/Fladder.git
synced 2026-03-16 18:56:00 -07:00
chore: Improved performance for some widgets (#525)
Co-authored-by: PartyDonut <PartyDonut@users.noreply.github.com>
This commit is contained in:
parent
10bd34bb20
commit
07972ea5ee
16 changed files with 589 additions and 545 deletions
|
|
@ -8,6 +8,7 @@ class PosterPlaceholder extends StatelessWidget {
|
|||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
final color = Theme.of(context).colorScheme.onSurface.withValues(alpha: 0.75);
|
||||
return Stack(
|
||||
alignment: Alignment.center,
|
||||
children: [
|
||||
|
|
@ -15,7 +16,10 @@ class PosterPlaceholder extends StatelessWidget {
|
|||
alignment: Alignment.topRight,
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.all(12.0),
|
||||
child: Opacity(opacity: 0.5, child: Icon(item.type.icon)),
|
||||
child: Icon(
|
||||
item.type.icon,
|
||||
color: color.withValues(alpha: 0.5),
|
||||
),
|
||||
),
|
||||
),
|
||||
Padding(
|
||||
|
|
@ -34,15 +38,14 @@ class PosterPlaceholder extends StatelessWidget {
|
|||
softWrap: true,
|
||||
),
|
||||
if (item.label(context) != null) ...[
|
||||
Opacity(
|
||||
opacity: 0.75,
|
||||
child: Text(
|
||||
item.label(context)!,
|
||||
maxLines: 2,
|
||||
textAlign: TextAlign.center,
|
||||
style: Theme.of(context).textTheme.titleSmall,
|
||||
softWrap: true,
|
||||
),
|
||||
Text(
|
||||
item.label(context)!,
|
||||
maxLines: 2,
|
||||
textAlign: TextAlign.center,
|
||||
style: Theme.of(context).textTheme.titleSmall?.copyWith(
|
||||
color: color.withValues(alpha: 0.75),
|
||||
),
|
||||
softWrap: true,
|
||||
),
|
||||
],
|
||||
],
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue