TF-765 Compose button is not shown properly in mobile

This commit is contained in:
dab246
2022-08-09 14:55:58 +07:00
committed by Dat H. Pham
parent 1f9c2333af
commit 77bad43ce6
2 changed files with 9 additions and 19 deletions
@@ -67,9 +67,6 @@ class _ScrollingFloatingButtonAnimatedState
/// Boolean value to indicate when scroll view is on top
bool _onTop = true;
/// Value to indicate when to show the child widget
bool _visibleText = false;
/// Controller for icon animation
late AnimationController _animationController;
@@ -135,13 +132,6 @@ class _ScrollingFloatingButtonAnimatedState
duration: widget.duration!,
height: widget.height,
width: _onTop ? widget.width : widget.height,
onEnd: () {
if (mounted) {
setState(() {
_visibleText = !_visibleText;
});
}
},
decoration: BoxDecoration(borderRadius: BorderRadius.all(Radius.circular(widget.height! / 2))),
child: InkWell(
borderRadius: BorderRadius.all(Radius.circular(widget.height! / 2)),
@@ -167,13 +157,7 @@ class _ScrollingFloatingButtonAnimatedState
),
...(_onTop
? [
Expanded(
child: AnimatedOpacity(
opacity: !_visibleText ? 1 : 0,
duration: const Duration(milliseconds: 100),
child: widget.text!,
),
)
Expanded(child: widget.text!)
]
: []),
],