floating_panel
floating_panel copied to clipboard
The icons remain visible even when the panel is closed
same issue, seems it's not fixed
the problem is this line is forced to true https://github.com/akshayejh/floating_panel/blob/c109783699ca4979adfbc6778c28189d483103a3/lib/floatingpanel.dart#L314
to simply fix this, you can change it to
visible: _panelState == PanelState.open,
for me, I also modified Visibility
to AnimatedOpacity
AnimatedOpacity(
duration: Duration(
milliseconds: _panelState == PanelState.open
? widget.panelAnimDuration ?? 400
: 0),
opacity: _panelState == PanelState.open ? 1 : 0,
child: Container(
child: Column(
children: List.generate(_buttons.length, (index) {
return GestureDetector(
onTap: () {
widget.onPressed(index);
},
child: _FloatButton(
size: widget.size ?? 70.0,
icon: _buttons[index],
color: widget.contentColor ?? Colors.white,
iconSize: widget.iconSize ?? 24.0,
),
);
}),
),
),
),