mirror of
https://github.com/gabehf/Fladder.git
synced 2026-03-17 11:16:33 -07:00
fix: FocusButton layering
This commit is contained in:
parent
5174bb3a6c
commit
1205b23a1b
1 changed files with 31 additions and 30 deletions
|
|
@ -150,14 +150,12 @@ class FocusButtonState extends State<FocusButton> {
|
||||||
},
|
},
|
||||||
onKeyEvent: _handleKey,
|
onKeyEvent: _handleKey,
|
||||||
child: ExcludeFocus(
|
child: ExcludeFocus(
|
||||||
child: FlatButton(
|
child: Stack(
|
||||||
|
children: [
|
||||||
|
FlatButton(
|
||||||
onTap: widget.onTap,
|
onTap: widget.onTap,
|
||||||
onSecondaryTapDown: widget.onSecondaryTapDown,
|
onSecondaryTapDown: widget.onSecondaryTapDown,
|
||||||
onLongPress: widget.onLongPress,
|
onLongPress: widget.onLongPress,
|
||||||
child: Stack(
|
|
||||||
children: [
|
|
||||||
ClipRRect(
|
|
||||||
borderRadius: FladderTheme.smallShape.borderRadius,
|
|
||||||
child: widget.child,
|
child: widget.child,
|
||||||
),
|
),
|
||||||
Positioned.fill(
|
Positioned.fill(
|
||||||
|
|
@ -166,6 +164,9 @@ class FocusButtonState extends State<FocusButton> {
|
||||||
builder: (context, value, child) => AnimatedOpacity(
|
builder: (context, value, child) => AnimatedOpacity(
|
||||||
opacity: value ? 1 : 0,
|
opacity: value ? 1 : 0,
|
||||||
duration: const Duration(milliseconds: 125),
|
duration: const Duration(milliseconds: 125),
|
||||||
|
child: Stack(
|
||||||
|
children: [
|
||||||
|
IgnorePointer(
|
||||||
child: Container(
|
child: Container(
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
color: Theme.of(context)
|
color: Theme.of(context)
|
||||||
|
|
@ -175,10 +176,11 @@ class FocusButtonState extends State<FocusButton> {
|
||||||
border: Border.all(width: 4, color: Theme.of(context).colorScheme.onPrimaryContainer),
|
border: Border.all(width: 4, color: Theme.of(context).colorScheme.onPrimaryContainer),
|
||||||
borderRadius: FladderTheme.smallShape.borderRadius,
|
borderRadius: FladderTheme.smallShape.borderRadius,
|
||||||
),
|
),
|
||||||
child: Stack(
|
|
||||||
children: widget.overlays,
|
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
...widget.overlays,
|
||||||
|
],
|
||||||
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
|
@ -186,7 +188,6 @@ class FocusButtonState extends State<FocusButton> {
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue