@@ -23,6 +23,9 @@ class DraggableHome extends StatefulWidget {
2323 /// Always Show Leading And Action : This make Leading and Action always visible. Default value is false.
2424 final bool alwaysShowLeadingAndAction;
2525
26+ /// Always Show Title : This make Title always visible. Default value is false.
27+ final bool alwaysShowTitle;
28+
2629 /// Drawer: Drawers are typically used with the Scaffold.drawer property.
2730 final Widget ? drawer;
2831
@@ -84,6 +87,7 @@ class DraggableHome extends StatefulWidget {
8487 this .centerTitle = true ,
8588 this .actions,
8689 this .alwaysShowLeadingAndAction = false ,
90+ this .alwaysShowTitle = false ,
8791 this .headerExpandedHeight = 0.35 ,
8892 required this .headerWidget,
8993 this .headerBottomBar,
@@ -202,11 +206,15 @@ class _DraggableHomeState extends State<DraggableHome> {
202206 title: StreamBuilder <bool >(
203207 stream: null ,
204208 builder: (context, snapshot) {
205- return AnimatedOpacity (
206- opacity: streams[0 ] ? 1 : 0 ,
207- duration: Duration (milliseconds: 100 ),
208- child: widget.title,
209- );
209+ if (widget.alwaysShowTitle) {
210+ return widget.title;
211+ } else {
212+ return AnimatedOpacity (
213+ opacity: streams[0 ] ? 1 : 0 ,
214+ duration: Duration (milliseconds: 100 ),
215+ child: widget.title,
216+ );
217+ }
210218 },
211219 ),
212220 collapsedHeight: appBarHeight,
0 commit comments