mirror of
https://github.com/gabehf/Fladder.git
synced 2026-03-07 21:48:14 -08:00
fix: FocusButton layering
This commit is contained in:
parent
5174bb3a6c
commit
1205b23a1b
1 changed files with 31 additions and 30 deletions
|
|
@ -150,40 +150,41 @@ class FocusButtonState extends State<FocusButton> {
|
|||
},
|
||||
onKeyEvent: _handleKey,
|
||||
child: ExcludeFocus(
|
||||
child: FlatButton(
|
||||
onTap: widget.onTap,
|
||||
onSecondaryTapDown: widget.onSecondaryTapDown,
|
||||
onLongPress: widget.onLongPress,
|
||||
child: Stack(
|
||||
children: [
|
||||
ClipRRect(
|
||||
borderRadius: FladderTheme.smallShape.borderRadius,
|
||||
child: widget.child,
|
||||
),
|
||||
Positioned.fill(
|
||||
child: ValueListenableBuilder(
|
||||
valueListenable: onHover,
|
||||
builder: (context, value, child) => AnimatedOpacity(
|
||||
opacity: value ? 1 : 0,
|
||||
duration: const Duration(milliseconds: 125),
|
||||
child: Container(
|
||||
decoration: BoxDecoration(
|
||||
color: Theme.of(context)
|
||||
.colorScheme
|
||||
.primaryContainer
|
||||
.withValues(alpha: widget.darkOverlay ? 0.1 : 0),
|
||||
border: Border.all(width: 4, color: Theme.of(context).colorScheme.onPrimaryContainer),
|
||||
borderRadius: FladderTheme.smallShape.borderRadius,
|
||||
child: Stack(
|
||||
children: [
|
||||
FlatButton(
|
||||
onTap: widget.onTap,
|
||||
onSecondaryTapDown: widget.onSecondaryTapDown,
|
||||
onLongPress: widget.onLongPress,
|
||||
child: widget.child,
|
||||
),
|
||||
Positioned.fill(
|
||||
child: ValueListenableBuilder(
|
||||
valueListenable: onHover,
|
||||
builder: (context, value, child) => AnimatedOpacity(
|
||||
opacity: value ? 1 : 0,
|
||||
duration: const Duration(milliseconds: 125),
|
||||
child: Stack(
|
||||
children: [
|
||||
IgnorePointer(
|
||||
child: Container(
|
||||
decoration: BoxDecoration(
|
||||
color: Theme.of(context)
|
||||
.colorScheme
|
||||
.primaryContainer
|
||||
.withValues(alpha: widget.darkOverlay ? 0.1 : 0),
|
||||
border: Border.all(width: 4, color: Theme.of(context).colorScheme.onPrimaryContainer),
|
||||
borderRadius: FladderTheme.smallShape.borderRadius,
|
||||
),
|
||||
),
|
||||
),
|
||||
child: Stack(
|
||||
children: widget.overlays,
|
||||
),
|
||||
),
|
||||
...widget.overlays,
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue