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

@@ -22,9 +22,10 @@ class SearchArticleController
}
void jump2Article() {
String? cvid = RegExp(r'^cv(id)?(\d+)$', caseSensitive: false)
.matchAsPrefix(keyword)
?.group(2);
String? cvid = RegExp(
r'^cv(id)?(\d+)$',
caseSensitive: false,
).matchAsPrefix(keyword)?.group(2);
if (cvid != null) {
WidgetsBinding.instance.addPostFrameCallback((_) {
Get.toNamed(
@@ -108,8 +109,8 @@ class SearchArticleController
: null,
textColor:
item['value'] == currentOrderFilterval.value
? theme.colorScheme.onSecondaryContainer
: null,
? theme.colorScheme.onSecondaryContainer
: null,
),
)
.toList(),

View File

@@ -19,8 +19,13 @@ class SearchArticlePanel extends CommonSearchPanel {
State<SearchArticlePanel> createState() => _SearchArticlePanelState();
}
class _SearchArticlePanelState extends CommonSearchPanelState<
SearchArticlePanel, SearchArticleData, SearchArticleItemModel> {
class _SearchArticlePanelState
extends
CommonSearchPanelState<
SearchArticlePanel,
SearchArticleData,
SearchArticleItemModel
> {
@override
late final SearchArticleController controller = Get.put(
SearchArticleController(

View File

@@ -43,15 +43,17 @@ class SearchArticleItem extends StatelessWidget {
if (item.imageUrls?.isNotEmpty == true)
AspectRatio(
aspectRatio: StyleString.aspectRatio,
child: LayoutBuilder(builder: (context, boxConstraints) {
double maxWidth = boxConstraints.maxWidth;
double maxHeight = boxConstraints.maxHeight;
return NetworkImgLayer(
width: maxWidth,
height: maxHeight,
src: item.imageUrls?.firstOrNull,
);
}),
child: LayoutBuilder(
builder: (context, boxConstraints) {
double maxWidth = boxConstraints.maxWidth;
double maxHeight = boxConstraints.maxHeight;
return NetworkImgLayer(
width: maxWidth,
height: maxHeight,
src: item.imageUrls?.firstOrNull,
);
},
),
),
const SizedBox(width: 10),
Expanded(
@@ -62,16 +64,19 @@ class SearchArticleItem extends StatelessWidget {
Text.rich(
maxLines: 2,
TextSpan(
children: item.title
.map((e) => TextSpan(
text: e.text,
style: TextStyle(
color: e.isEm
? theme.colorScheme.primary
: theme.colorScheme.onSurface,
),
))
.toList()),
children: item.title
.map(
(e) => TextSpan(
text: e.text,
style: TextStyle(
color: e.isEm
? theme.colorScheme.primary
: theme.colorScheme.onSurface,
),
),
)
.toList(),
),
),
const Spacer(),
Text(