@@ -175,16 +175,30 @@ class BottomSheetHeader extends StatelessWidget {
175
175
176
176
final baseTitleStyle = TextStyle (
177
177
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 ,
179
182
color: designVariables.title,
180
183
).merge (weightVariableTextStyle (context, wght: 600 ));
181
184
182
- final effectiveTitle = switch ((buildTitle, title)) {
185
+ Widget ? effectiveTitle = switch ((buildTitle, title)) {
183
186
(final build? , null ) => build (baseTitleStyle),
184
187
(null , final data? ) => Text (style: baseTitleStyle, data),
185
188
_ => null ,
186
189
};
187
190
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
+
188
202
final baseMessageStyle = TextStyle (
189
203
color: designVariables.labelTime,
190
204
fontSize: 17 ,
0 commit comments