|
@@ -11,6 +11,7 @@ class TitleBarWidget extends StatelessWidget {
|
|
final List<Widget>? actionIcons;
|
|
final List<Widget>? actionIcons;
|
|
final bool isTitleH2WithoutLeading;
|
|
final bool isTitleH2WithoutLeading;
|
|
final bool isFlexibleSpaceDisabled;
|
|
final bool isFlexibleSpaceDisabled;
|
|
|
|
+ final bool isOnTopOfScreen;
|
|
const TitleBarWidget({
|
|
const TitleBarWidget({
|
|
this.leading,
|
|
this.leading,
|
|
this.title,
|
|
this.title,
|
|
@@ -20,6 +21,7 @@ class TitleBarWidget extends StatelessWidget {
|
|
this.actionIcons,
|
|
this.actionIcons,
|
|
this.isTitleH2WithoutLeading = false,
|
|
this.isTitleH2WithoutLeading = false,
|
|
this.isFlexibleSpaceDisabled = false,
|
|
this.isFlexibleSpaceDisabled = false,
|
|
|
|
+ this.isOnTopOfScreen = true,
|
|
super.key,
|
|
super.key,
|
|
});
|
|
});
|
|
|
|
|
|
@@ -29,13 +31,14 @@ class TitleBarWidget extends StatelessWidget {
|
|
final textTheme = getEnteTextTheme(context);
|
|
final textTheme = getEnteTextTheme(context);
|
|
final colorTheme = getEnteColorScheme(context);
|
|
final colorTheme = getEnteColorScheme(context);
|
|
return SliverAppBar(
|
|
return SliverAppBar(
|
|
|
|
+ primary: isOnTopOfScreen ? true : false,
|
|
toolbarHeight: toolbarHeight,
|
|
toolbarHeight: toolbarHeight,
|
|
leadingWidth: 48,
|
|
leadingWidth: 48,
|
|
automaticallyImplyLeading: false,
|
|
automaticallyImplyLeading: false,
|
|
pinned: true,
|
|
pinned: true,
|
|
- expandedHeight: 102,
|
|
|
|
|
|
+ expandedHeight: isFlexibleSpaceDisabled ? toolbarHeight : 102,
|
|
centerTitle: false,
|
|
centerTitle: false,
|
|
- titleSpacing: 0,
|
|
|
|
|
|
+ titleSpacing: 4,
|
|
title: Padding(
|
|
title: Padding(
|
|
padding: EdgeInsets.only(left: isTitleH2WithoutLeading ? 16 : 0),
|
|
padding: EdgeInsets.only(left: isTitleH2WithoutLeading ? 16 : 0),
|
|
child: Column(
|
|
child: Column(
|