add transition for toolbar appearing and disappearing

This commit is contained in:
Filip Krawczyk 2022-08-25 17:40:37 +02:00
parent 2cc82e6a45
commit c83e93c755
1 changed files with 17 additions and 14 deletions

View File

@ -60,6 +60,8 @@ class EditorToolbar extends HookWidget {
create: (context) => store, create: (context) => store,
child: AsyncStoreListener( child: AsyncStoreListener(
asyncStore: store.imageUploadState, asyncStore: store.imageUploadState,
child: AnimatedSwitcher(
duration: const Duration(milliseconds: 200),
child: visible child: visible
? Container( ? Container(
height: _height, height: _height,
@ -77,6 +79,7 @@ class EditorToolbar extends HookWidget {
) )
: const SizedBox.shrink(), : const SizedBox.shrink(),
), ),
),
); );
} }