Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
This commit is contained in:
bggRGjQaUbCoE
2025-10-19 20:50:23 +08:00
parent cc00b2cc39
commit 488ca29fc1
5 changed files with 36 additions and 14 deletions

View File

@@ -115,6 +115,7 @@ class RichText extends MultiChildRenderObjectWidget {
this.selectionRegistrar,
this.selectionColor,
this.onShowMore,
required this.primary,
}) : assert(maxLines == null || maxLines > 0),
assert(selectionRegistrar == null || selectionColor != null),
assert(
@@ -229,6 +230,8 @@ class RichText extends MultiChildRenderObjectWidget {
/// widgets.
final Color? selectionColor;
final Color primary;
final VoidCallback? onShowMore;
@override
@@ -248,7 +251,7 @@ class RichText extends MultiChildRenderObjectWidget {
locale: locale ?? Localizations.maybeLocaleOf(context),
registrar: selectionRegistrar,
selectionColor: selectionColor,
primary: Theme.of(context).colorScheme.primary,
primary: primary,
onShowMore: onShowMore,
);
}
@@ -270,7 +273,7 @@ class RichText extends MultiChildRenderObjectWidget {
..locale = locale ?? Localizations.maybeLocaleOf(context)
..registrar = selectionRegistrar
..selectionColor = selectionColor
..primary = Theme.of(context).colorScheme.primary
..primary = primary
..onShowMore = onShowMore;
}