From cfef140ba935b008c485e5966714c49dd1253c5d Mon Sep 17 00:00:00 2001
From: Saptarshi Adhikari <66560136+Mastermind-sap@users.noreply.github.com>
Date: Fri, 28 Mar 2025 00:17:48 +0530
Subject: [PATCH] Removed not working hyperlinks to ScriptCategory values
(#165395)
## Description
Removing the hyperlinks to ScriptCategory values which are not working
with only `code text`.
---
## Screenshots
### Before :
ScriptCategory.englishLike hyperlink not working:
### After :
---
- Fixes #164877
---
## Pre-launch Checklist
- [x] I read the [Contributor Guide] and followed the process outlined
there for submitting PRs.
- [x] I read the [Tree Hygiene] wiki page, which explains my
responsibilities.
- [x] I read and followed the [Flutter Style Guide], including [Features
we expect every widget to implement].
- [x] I signed the [CLA].
- [x] I listed at least one issue that this PR fixes in the description
above.
- [x] I updated/added relevant documentation (doc comments with `///`).
- [x] I added new tests to check the change I am making, or this PR is
[test-exempt].
- [x] I followed the [breaking change policy] and added [Data Driven
Fixes] where supported.
- [x] All existing and new tests are passing.
If you need help, consider asking for advice on the #hackers-new channel
on [Discord].
[Contributor Guide]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#overview
[Tree Hygiene]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md
[test-exempt]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#tests
[Flutter Style Guide]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md
[Features we expect every widget to implement]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md#features-we-expect-every-widget-to-implement
[CLA]: https://cla.developers.google.com/
[flutter/tests]: https://github.com/flutter/tests
[breaking change policy]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#handling-breaking-changes
[Discord]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Chat.md
[Data Driven Fixes]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Data-driven-Fixes.md
---
.../src/material/material_localizations.dart | 6 +++---
.../flutter/lib/src/material/typography.dart | 20 +++++++++----------
2 files changed, 13 insertions(+), 13 deletions(-)
diff --git a/packages/flutter/lib/src/material/material_localizations.dart b/packages/flutter/lib/src/material/material_localizations.dart
index 557f963cb7..1b7e103835 100644
--- a/packages/flutter/lib/src/material/material_localizations.dart
+++ b/packages/flutter/lib/src/material/material_localizations.dart
@@ -236,10 +236,10 @@ abstract class MaterialLocalizations {
/// the [Typography.geometryThemeFor] method in terms of the
/// three language categories defined in https://material.io/go/design-typography.
///
- /// Generally speaking, font sizes for [ScriptCategory.tall] and
- /// [ScriptCategory.dense] scripts - for text styles that are smaller than the
+ /// Generally speaking, font sizes for `ScriptCategory.tall` and
+ /// `ScriptCategory.dense` scripts - for text styles that are smaller than the
/// title style - are one unit larger than they are for
- /// [ScriptCategory.englishLike] scripts.
+ /// `ScriptCategory.englishLike` scripts.
ScriptCategory get scriptCategory;
/// Formats [number] as a decimal, inserting locale-appropriate thousands
diff --git a/packages/flutter/lib/src/material/typography.dart b/packages/flutter/lib/src/material/typography.dart
index 55218ddbba..5112c087b2 100644
--- a/packages/flutter/lib/src/material/typography.dart
+++ b/packages/flutter/lib/src/material/typography.dart
@@ -24,10 +24,10 @@ import 'text_theme.dart';
/// the [Typography.geometryThemeFor] method in terms of the
/// three language categories defined in .
///
-/// Generally speaking, font sizes for [ScriptCategory.tall] and
-/// [ScriptCategory.dense] scripts - for text styles that are smaller than the
+/// Generally speaking, font sizes for `ScriptCategory.tall` and
+/// `ScriptCategory.dense` scripts - for text styles that are smaller than the
/// title style - are one unit larger than they are for
-/// [ScriptCategory.englishLike] scripts.
+/// `ScriptCategory.englishLike` scripts.
enum ScriptCategory {
/// The languages of Western, Central, and Eastern Europe and much of
/// Africa are typically written in the Latin alphabet. Vietnamese is a
@@ -260,12 +260,12 @@ class Typography with Diagnosticable {
/// geometry.
final TextTheme white;
- /// Defines text geometry for [ScriptCategory.englishLike] scripts, such as
+ /// Defines text geometry for `ScriptCategory.englishLike` scripts, such as
/// English, French, Russian, etc.
///
/// This text theme is merged with either [black] or [white], depending
/// on the overall [ThemeData.brightness], when the current locale's
- /// [MaterialLocalizations.scriptCategory] is [ScriptCategory.englishLike].
+ /// [MaterialLocalizations.scriptCategory] is `ScriptCategory.englishLike`.
///
/// To look up a localized [TextTheme], use the overall [Theme], for
/// example: `Theme.of(context).textTheme`.
@@ -276,7 +276,7 @@ class Typography with Diagnosticable {
///
/// This text theme is merged with either [black] or [white], depending
/// on the overall [ThemeData.brightness], when the current locale's
- /// [MaterialLocalizations.scriptCategory] is [ScriptCategory.dense].
+ /// [MaterialLocalizations.scriptCategory] is `ScriptCategory.dense`.
///
/// To look up a localized [TextTheme], use the overall [Theme], for
/// example: `Theme.of(context).textTheme`.
@@ -286,7 +286,7 @@ class Typography with Diagnosticable {
///
/// This text theme is merged with either [black] or [white], depending
/// on the overall [ThemeData.brightness], when the current locale's
- /// [MaterialLocalizations.scriptCategory] is [ScriptCategory.tall].
+ /// [MaterialLocalizations.scriptCategory] is `ScriptCategory.tall`.
///
/// To look up a localized [TextTheme], use the overall [Theme], for
/// example: `Theme.of(context).textTheme`.
@@ -1387,7 +1387,7 @@ class Typography with Diagnosticable {
),
);
- /// Defines text geometry for [ScriptCategory.englishLike] scripts, such as
+ /// Defines text geometry for `ScriptCategory.englishLike` scripts, such as
/// English, French, Russian, etc.
static const TextTheme englishLike2014 = TextTheme(
displayLarge: TextStyle(
@@ -1499,7 +1499,7 @@ class Typography with Diagnosticable {
),
);
- /// Defines text geometry for [ScriptCategory.englishLike] scripts, such as
+ /// Defines text geometry for `ScriptCategory.englishLike` scripts, such as
/// English, French, Russian, etc.
///
/// The font sizes, weights, and letter spacings in this version match the
@@ -2071,7 +2071,7 @@ class Typography with Diagnosticable {
),
);
- /// Defines text geometry for [ScriptCategory.englishLike] scripts, such as
+ /// Defines text geometry for `ScriptCategory.englishLike` scripts, such as
/// English, French, Russian, etc.
///
/// The font sizes, weights, and letter spacings in this version match the