Skip to content

Commit

Permalink
fix: Sliver App Bar 2 word title fixed to one line (#1489)
Browse files Browse the repository at this point in the history
  • Loading branch information
abhay1821 authored Apr 5, 2022
1 parent a608b96 commit 6e6f3b8
Showing 1 changed file with 10 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -282,11 +282,16 @@ class _ProductQueryPageState extends State<ProductQueryPage> {
(BuildContext context, BoxConstraints constraints) {
return FlexibleSpaceBar(
centerTitle: true,
title: Text(
widget.name,
textAlign: TextAlign.center,
style: themeData.textTheme.headline1!
.copyWith(color: widget.mainColor),
title: SizedBox(
width: screenSize.width * 0.50,
child: FittedBox(
child: Text(
widget.name,
textAlign: TextAlign.center,
style: themeData.textTheme.headline1!
.copyWith(color: widget.mainColor),
),
),
),
background: _getHero(screenSize, themeData));
}),
Expand Down

0 comments on commit 6e6f3b8

Please sign in to comment.