reorganize and rename widgets
This commit is contained in:
parent
05d25869ef
commit
d5f29dc344
1 changed files with 568 additions and 547 deletions
20
lib/widgets/common/highlight_wrapper.dart
Normal file
20
lib/widgets/common/highlight_wrapper.dart
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
import "package:material_ui/material_ui.dart";
|
||||
|
||||
final class const HighlightWrapper(
|
||||
final Widget child, {
|
||||
final bool isHighlighted = false,
|
||||
super.key,
|
||||
}) extends StatelessWidget {
|
||||
@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: Durations.medium1,
|
||||
child: Material(color: Colors.transparent, child: child),
|
||||
),
|
||||
);
|
||||
}
|
||||
Loading…
Reference in a new issue