Signed-off-by: dom <githubaccount56556@proton.me>
This commit is contained in:
dom
2026-01-31 13:10:09 +08:00
parent dbc7bcd0dd
commit 8964197b73
68 changed files with 560 additions and 293 deletions

View File

@@ -23,8 +23,9 @@ class SysMsgPage extends StatefulWidget {
}
class _SysMsgPageState extends State<SysMsgPage> {
late final _sysMsgController = Get.put(SysMsgController());
late final RegExp urlRegExp = RegExp(
final _sysMsgController = Get.put(SysMsgController());
static final RegExp _urlRegExp = RegExp(
r'#\{([^}]*)\}\{([^}]*)\}|https?:\/\/[^\s/\$.?#].[^\s]*|www\.[^\s/\$.?#].[^\s]*|【(.*?)】|(\d+)',
);
@@ -135,7 +136,7 @@ class _SysMsgPageState extends State<SysMsgPage> {
InlineSpan _buildContent(ThemeData theme, String content) {
final List<InlineSpan> spanChildren = <InlineSpan>[];
content.splitMapJoin(
urlRegExp,
_urlRegExp,
onMatch: (Match match) {
final matchStr = match[0]!;
if (matchStr.startsWith('#')) {