From 77bad43ce6a3ee4e163478932c8acd9ff861e872 Mon Sep 17 00:00:00 2001 From: dab246 Date: Tue, 9 Aug 2022 14:55:58 +0700 Subject: [PATCH] TF-765 Compose button is not shown properly in mobile --- .../scrolling_floating_button_animated.dart | 18 +----------------- .../thread/presentation/thread_view.dart | 10 ++++++++-- 2 files changed, 9 insertions(+), 19 deletions(-) diff --git a/core/lib/presentation/views/floating_button/scrolling_floating_button_animated.dart b/core/lib/presentation/views/floating_button/scrolling_floating_button_animated.dart index dd50541cf..41448b33b 100644 --- a/core/lib/presentation/views/floating_button/scrolling_floating_button_animated.dart +++ b/core/lib/presentation/views/floating_button/scrolling_floating_button_animated.dart @@ -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!) ] : []), ], diff --git a/lib/features/thread/presentation/thread_view.dart b/lib/features/thread/presentation/thread_view.dart index b59285cbb..f35df7b03 100644 --- a/lib/features/thread/presentation/thread_view.dart +++ b/lib/features/thread/presentation/thread_view.dart @@ -433,9 +433,15 @@ class ThreadView extends GetWidget 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,