@@ -175,16 +175,30 @@ class BottomSheetHeader extends StatelessWidget {
175175
176176 final baseTitleStyle = TextStyle (
177177 fontSize: 20 ,
178- height: 20 / 20 ,
178+ // More height than in Figma, but it was looking too tight:
179+ // https://github.com/zulip/zulip-flutter/pull/1877#issuecomment-3379664807
180+ // (See use of TextHeightBehavior below.)
181+ height: 24 / 20 ,
179182 color: designVariables.title,
180183 ).merge (weightVariableTextStyle (context, wght: 600 ));
181184
182- final effectiveTitle = switch ((buildTitle, title)) {
185+ Widget ? effectiveTitle = switch ((buildTitle, title)) {
183186 (final build? , null ) => build (baseTitleStyle),
184187 (null , final data? ) => Text (style: baseTitleStyle, data),
185188 _ => null ,
186189 };
187190
191+ if (effectiveTitle != null ) {
192+ effectiveTitle = DefaultTextHeightBehavior (
193+ textHeightBehavior: TextHeightBehavior (
194+ // We want some breathing room between lines,
195+ // without adding margin above or below the title.
196+ applyHeightToFirstAscent: false ,
197+ applyHeightToLastDescent: false ,
198+ ),
199+ child: effectiveTitle);
200+ }
201+
188202 final baseMessageStyle = TextStyle (
189203 color: designVariables.labelTime,
190204 fontSize: 17 ,
0 commit comments