From 6e6f3b88484076f48c949d6f1f4be968a3f5bb39 Mon Sep 17 00:00:00 2001 From: Abhay Chaudhary Date: Tue, 5 Apr 2022 16:37:02 +0530 Subject: [PATCH] fix: Sliver App Bar 2 word title fixed to one line (#1489) --- .../pages/product/common/product_query_page.dart | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/packages/smooth_app/lib/pages/product/common/product_query_page.dart b/packages/smooth_app/lib/pages/product/common/product_query_page.dart index 92a6437d2ad..9e9feab4ada 100644 --- a/packages/smooth_app/lib/pages/product/common/product_query_page.dart +++ b/packages/smooth_app/lib/pages/product/common/product_query_page.dart @@ -282,11 +282,16 @@ class _ProductQueryPageState extends State { (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)); }),