AnimatedCrossFade
AppBar(
title: AnimatedCrossFade(
duration: Duration(milliseconds: 250),
firstChild: Text("Title"),
secondChild: TextField(),
alignment: Alignment.centerLeft,
layoutBuilder: (w1, _, w2, __) {
return Container(
height: 43.0,
width: double.infinity,
child: Stack(
alignment: Alignment.centerLeft,
children: <Widget>[w1, w2],
),
);
},
crossFadeState:
!searching ? CrossFadeState.showSecond : CrossFadeState.showFirst,
),
)