diff --git a/lib/views/home_page/home_page.dart b/lib/views/home_page/home_page.dart
index 9cfba7a..3286fa6 100644
--- a/lib/views/home_page/home_page.dart
+++ b/lib/views/home_page/home_page.dart
@@ -155,15 +155,18 @@ class _BodyState extends State
{
],
),
BlocBuilder(
- builder: (context, state) => state.isButtonToTopShown
- ? Container(
- alignment: Alignment.topRight,
- padding: EdgeInsets.only(right: 16, top: 64),
- child: FloatingActionButton(
- onPressed: _goToTop,
- child: Icon(Icons.arrow_upward_rounded),
- ))
- : SizedBox.shrink(),
+ builder: (context, state) => AnimatedSwitcher(
+ duration: Duration(milliseconds: 250),
+ child: state.isButtonToTopShown
+ ? Container(
+ key: ValueKey(1),
+ alignment: Alignment.topRight,
+ padding: EdgeInsets.only(right: 16, top: 72),
+ child: FloatingActionButton(
+ onPressed: _goToTop,
+ child: Icon(Icons.arrow_upward_rounded),
+ ))
+ : SizedBox.shrink(key: ValueKey(0))),
)
]);
}