Use Material theme colors in transcript links
Remove the obsolete Cupertino theme dependency from link rendering and keep the shown-entry documentation accurate after the transcript cleanup.
This commit is contained in:
@@ -1,4 +1,3 @@
|
|||||||
import 'package:flutter/cupertino.dart';
|
|
||||||
import 'package:flutter/gestures.dart';
|
import 'package:flutter/gestures.dart';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:flutter/services.dart';
|
import 'package:flutter/services.dart';
|
||||||
@@ -76,8 +75,8 @@ class ChatLinkSpans {
|
|||||||
..onSecondaryTapUp = _ownsSecondaryClick
|
..onSecondaryTapUp = _ownsSecondaryClick
|
||||||
? (details) => _showLinkMenu(context, details.globalPosition, url)
|
? (details) => _showLinkMenu(context, details.globalPosition, url)
|
||||||
: null;
|
: null;
|
||||||
// The app theme's primary colour, read from the app's Cupertino theme.
|
// The app theme's primary colour.
|
||||||
final color = CupertinoTheme.of(context).primaryColor;
|
final color = Theme.of(context).colorScheme.primary;
|
||||||
return _leaves(
|
return _leaves(
|
||||||
TextSpan(
|
TextSpan(
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ import 'package:flutter/material.dart';
|
|||||||
|
|
||||||
import '../../../../../core/api_gateway.dart';
|
import '../../../../../core/api_gateway.dart';
|
||||||
|
|
||||||
/// The secondary text colour of the transcript's cards.
|
/// The secondary text colour of a shown entry.
|
||||||
Color chatShownSecondary(BuildContext context) =>
|
Color chatShownSecondary(BuildContext context) =>
|
||||||
Theme.of(context).colorScheme.onSurfaceVariant;
|
Theme.of(context).colorScheme.onSurfaceVariant;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user