mirror of
https://github.com/bggRGjQaUbCoE/PiliPlus.git
synced 2026-05-31 16:18:22 +08:00
@@ -81,39 +81,31 @@ class _LiveAreaChildPageState extends State<LiveAreaChildPage>
|
||||
slivers: [
|
||||
if (_controller.newTags?.isNotEmpty == true)
|
||||
SliverToBoxAdapter(
|
||||
child: SelfSizedHorizontalList(
|
||||
padding: const .only(bottom: 12),
|
||||
separatorBuilder: (_, _) => const SizedBox(width: 12),
|
||||
itemBuilder: (context, index) {
|
||||
late final item = _controller.newTags![index];
|
||||
return Obx(
|
||||
() {
|
||||
final isCurr = index == _controller.tagIndex.value;
|
||||
return SearchText(
|
||||
fontSize: 14,
|
||||
padding: const EdgeInsets.symmetric(
|
||||
horizontal: 8,
|
||||
vertical: 3,
|
||||
),
|
||||
text: '${item.name}',
|
||||
bgColor: isCurr
|
||||
? theme.colorScheme.secondaryContainer
|
||||
: Colors.transparent,
|
||||
textColor: isCurr
|
||||
? theme.colorScheme.onSecondaryContainer
|
||||
: null,
|
||||
onTap: (value) {
|
||||
_controller.onSelectTag(
|
||||
index,
|
||||
item.sortType,
|
||||
);
|
||||
},
|
||||
);
|
||||
},
|
||||
);
|
||||
},
|
||||
itemCount: _controller.newTags!.length,
|
||||
),
|
||||
child: Obx(() {
|
||||
final tagIndex = _controller.tagIndex.value;
|
||||
return SelfSizedHorizontalList(
|
||||
padding: const .only(bottom: 12),
|
||||
separatorBuilder: (_, _) => const SizedBox(width: 12),
|
||||
itemBuilder: (context, index) {
|
||||
final item = _controller.newTags![index];
|
||||
final isCurr = index == tagIndex;
|
||||
return SearchText(
|
||||
fontSize: 14,
|
||||
padding: const .symmetric(horizontal: 8, vertical: 3),
|
||||
text: item.name!,
|
||||
bgColor: isCurr
|
||||
? theme.colorScheme.secondaryContainer
|
||||
: Colors.transparent,
|
||||
textColor: isCurr
|
||||
? theme.colorScheme.onSecondaryContainer
|
||||
: null,
|
||||
onTap: (value) =>
|
||||
_controller.onSelectTag(index, item.sortType),
|
||||
);
|
||||
},
|
||||
itemCount: _controller.newTags!.length,
|
||||
);
|
||||
}),
|
||||
),
|
||||
response != null && response.isNotEmpty
|
||||
? SliverGrid.builder(
|
||||
|
||||
Reference in New Issue
Block a user