mirror of
https://github.com/krille-chan/fluffychat
synced 2024-09-19 04:55:09 +00:00
refactor: Use AnimatedSize for FAB
This commit is contained in:
parent
4f55561269
commit
000e595d8b
1 changed files with 2 additions and 6 deletions
|
@ -63,14 +63,10 @@ class StartChatFloatingActionButton extends StatelessWidget {
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return ValueListenableBuilder<bool>(
|
return ValueListenableBuilder<bool>(
|
||||||
valueListenable: scrolledToTop,
|
valueListenable: scrolledToTop,
|
||||||
builder: (context, scrolledToTop, _) => AnimatedContainer(
|
builder: (context, scrolledToTop, _) => AnimatedSize(
|
||||||
duration: FluffyThemes.animationDuration,
|
duration: FluffyThemes.animationDuration,
|
||||||
curve: FluffyThemes.animationCurve,
|
curve: FluffyThemes.animationCurve,
|
||||||
width: roomsIsEmpty
|
clipBehavior: Clip.none,
|
||||||
? null
|
|
||||||
: scrolledToTop
|
|
||||||
? 144
|
|
||||||
: 56,
|
|
||||||
child: scrolledToTop
|
child: scrolledToTop
|
||||||
? FloatingActionButton.extended(
|
? FloatingActionButton.extended(
|
||||||
onPressed: () => _onPressed(context),
|
onPressed: () => _onPressed(context),
|
||||||
|
|
Loading…
Reference in a new issue