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!)
]
: []),
],
@@ -433,9 +433,15 @@ class ThreadView extends GetWidget<ThreadController> with AppLoaderMixin,
alignment: Alignment.bottomRight,
child: ScrollingFloatingButtonAnimated(
icon: SvgPicture.asset(_imagePaths.icCompose, width: 20, height: 20, fit: BoxFit.fill),
text: Padding(padding: const EdgeInsets.only(right: 10),
text: Padding(
padding: const EdgeInsets.only(right: 16),
child: Text(AppLocalizations.of(context).compose,
style: const TextStyle(color: AppColor.colorTextButton, fontSize: 15.0, fontWeight: FontWeight.w500))),
overflow: CommonTextStyle.defaultTextOverFlow,
softWrap: CommonTextStyle.defaultSoftWrap,
style: const TextStyle(
color: AppColor.colorTextButton,
fontSize: 15.0,
fontWeight: FontWeight.w500))),
onPress: () => controller.mailboxDashBoardController.goToComposer(ComposerArguments()),
scrollController: controller.listEmailController,
color: Colors.white,