mirror of
https://github.com/bggRGjQaUbCoE/PiliPlus.git
synced 2026-04-20 19:14:42 +08:00
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user