Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
This commit is contained in:
bggRGjQaUbCoE
2025-07-23 16:47:11 +08:00
parent 148e0872b4
commit 418a1e8d39
821 changed files with 29467 additions and 25520 deletions

View File

@@ -37,8 +37,10 @@ class LiveRoomChat extends StatelessWidget {
alignment: Alignment.centerLeft,
padding: const EdgeInsets.symmetric(horizontal: 16),
child: Container(
padding:
const EdgeInsets.symmetric(horizontal: 10, vertical: 5),
padding: const EdgeInsets.symmetric(
horizontal: 10,
vertical: 5,
),
decoration: BoxDecoration(
color: isPP == true
? Colors.black.withValues(alpha: 0.3)
@@ -89,7 +91,7 @@ class LiveRoomChat extends StatelessWidget {
),
)
: const SizedBox.shrink(),
)
),
],
);
}
@@ -99,7 +101,7 @@ class LiveRoomChat extends StatelessWidget {
dynamic uemote = obj['uemote'];
List<String> list = [
if (emots != null) ...emots.keys,
if (uemote is Map) uemote['emoticon_unique'].replaceFirst('upower_', '')
if (uemote is Map) uemote['emoticon_unique'].replaceFirst('upower_', ''),
];
if (list.isNotEmpty) {
RegExp regExp = RegExp(list.map(RegExp.escape).join('|'));
@@ -109,16 +111,19 @@ class LiveRoomChat extends StatelessWidget {
onMatch: (Match match) {
String key = match[0]!;
dynamic emote = emots?[key] ?? uemote;
spanChildren.add(WidgetSpan(
child: ExcludeSemantics(
spanChildren.add(
WidgetSpan(
child: ExcludeSemantics(
child: NetworkImgLayer(
src: emote['url'],
type: ImageType.emote,
width: emote['width'].toDouble(),
height: emote['height'].toDouble(),
semanticsLabel: key,
)),
));
src: emote['url'],
type: ImageType.emote,
width: emote['width'].toDouble(),
height: emote['height'].toDouble(),
semanticsLabel: key,
),
),
),
);
return '';
},
onNonMatch: (String nonMatchStr) {