Skip to content

Commit 12f1161

Browse files
committed
Made profile metadata text size consistent
1 parent 466d542 commit 12f1161

File tree

1 file changed

+9
-7
lines changed

1 file changed

+9
-7
lines changed

lib/profile/profile.dart

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -184,6 +184,8 @@ class _ProfileScreenBodyState extends State<ProfileScreenBody> with TickerProvid
184184
// The height of the app bar should be all the inner components, plus any margins
185185
var appBarHeight = profileStuffTop + avatarHeight + metadataHeight + 8 + descriptionHeight;
186186

187+
var metadataTextStyle = const TextStyle(fontSize: 12.5);
188+
187189
return Scaffold(
188190
body: Stack(children: [
189191
NestedScrollView(
@@ -313,8 +315,8 @@ class _ProfileScreenBodyState extends State<ProfileScreenBody> with TickerProvid
313315
const SizedBox(width: 4),
314316
Text.rich(TextSpan(
315317
children: [
316-
TextSpan(text: '${widget.profile.user.friendsCount}', style: const TextStyle(fontSize: 12, fontWeight: FontWeight.w500)),
317-
TextSpan(text: ' ${L10n.current.following.toLowerCase()}', style: const TextStyle(fontSize: 12))
318+
TextSpan(text: '${widget.profile.user.friendsCount}', style: metadataTextStyle.copyWith(fontWeight: FontWeight.w500)),
319+
TextSpan(text: ' ${L10n.current.following.toLowerCase()}', style: metadataTextStyle)
318320
]
319321
)),
320322
],
@@ -330,8 +332,8 @@ class _ProfileScreenBodyState extends State<ProfileScreenBody> with TickerProvid
330332
const SizedBox(width: 4),
331333
Text.rich(TextSpan(
332334
children: [
333-
TextSpan(text: '${widget.profile.user.followersCount}', style: const TextStyle(fontSize: 12, fontWeight: FontWeight.w500)),
334-
TextSpan(text: ' ${L10n.current.followers.toLowerCase()}', style: const TextStyle(fontSize: 12))
335+
TextSpan(text: '${widget.profile.user.followersCount}', style: metadataTextStyle.copyWith(fontWeight: FontWeight.w500)),
336+
TextSpan(text: ' ${L10n.current.followers.toLowerCase()}', style: metadataTextStyle)
335337
]
336338
)),
337339
],
@@ -345,7 +347,7 @@ class _ProfileScreenBodyState extends State<ProfileScreenBody> with TickerProvid
345347
children: [
346348
const Icon(Icons.place, size: 12, color: Colors.white),
347349
const SizedBox(width: 4),
348-
Text(user.location!, style: const TextStyle(fontSize: 13)),
350+
Text(user.location!, style: metadataTextStyle),
349351
],
350352
),
351353
),
@@ -368,7 +370,7 @@ class _ProfileScreenBodyState extends State<ProfileScreenBody> with TickerProvid
368370
var displayUrl = url.displayUrl ?? url.url;
369371
var expandedUrl = url.expandedUrl ?? url.url;
370372

371-
var textStyle = const TextStyle(fontSize: 12.5);
373+
var textStyle = metadataTextStyle;
372374
if (displayUrl == null || expandedUrl == null) {
373375
return Text(L10n.current.unsupported_url, style: textStyle.copyWith(color: theme.hintColor));
374376
}
@@ -391,7 +393,7 @@ class _ProfileScreenBodyState extends State<ProfileScreenBody> with TickerProvid
391393
const SizedBox(width: 4),
392394
Text(L10n.of(context)
393395
.joined(DateFormat('MMMM yyyy').format(user.createdAt!)),
394-
style: const TextStyle(fontSize: 13)
396+
style: metadataTextStyle
395397
),
396398
],
397399
),

0 commit comments

Comments
 (0)