1
0
Fork 0
forked from Nexus/nexus

rename FlashWrapper to HighlightWrapper

This commit is contained in:
Henry Hiles 2026-06-08 11:03:34 -04:00
commit e15d947fac
Signed by: Henry-Hiles
SSH key fingerprint: SHA256:VKQUdS31Q90KvX7EkKMHMBpUspcmItAh86a+v7PGiIs
2 changed files with 13 additions and 13 deletions

View file

@ -0,0 +1,20 @@
import "package:flutter/material.dart";
class HighlightWrapper extends StatelessWidget {
final Widget child;
final bool isHighlighted;
const HighlightWrapper(this.child, {this.isHighlighted = false, super.key});
@override
Widget build(BuildContext context) => ClipRRect(
borderRadius: .all(.circular(12)),
child: AnimatedContainer(
padding: isHighlighted ? .all(8) : .all(0),
color: isHighlighted
? Theme.of(context).colorScheme.onSurface.withAlpha(50)
: Colors.transparent,
duration: .new(milliseconds: 250),
child: child,
),
);
}