I am trying to replicate this animation with my appBar
:
I know I can use SliverAppBar
and simply animate the textSize
. But how would I implement the logic for the image? It moves to the right and slightly shrinks.
This is what I have for the text
:
SliverAppBar(
expandedHeight: 200,
flexibleSpace: FlexibleSpaceBar(
title: Text('Test', textScaleFactor: 1),
),
pinned: true,
),
Any idea how I could solve this?
2
Answers
You play with
SliverPersistentHeaderDelegate
And used on
You can try using AnimatedPositioned class which flutter already provide .
Check this link
https://api.flutter.dev/flutter/widgets/AnimatedPositioned-class.html
You can use it and the change the position and size depending on a specific action .