关怀模式

This commit is contained in:
Developer
2026-04-02 22:30:49 +08:00
parent 09fee0694c
commit 7872f2e78a
70 changed files with 4884 additions and 2752 deletions

View File

@@ -178,11 +178,12 @@ class AllListPageState extends State<AllListPage> {
Widget build(BuildContext context) {
return Obx(() {
final isDark = _themeController.isDarkMode;
final themeColor = _themeController.currentThemeColor;
if (_isLoading && _cards.isEmpty) {
return Center(
child: CircularProgressIndicator(
color: isDark ? Colors.white : AppConstants.primaryColor,
color: isDark ? Colors.white : themeColor,
),
);
}
@@ -216,7 +217,7 @@ class AllListPageState extends State<AllListPage> {
if (index == _cards.length) {
return _buildBottomIndicator(isDark);
}
return _buildCard(_cards[index], isDark);
return _buildCard(_cards[index], isDark, themeColor);
},
),
);
@@ -285,25 +286,22 @@ class AllListPageState extends State<AllListPage> {
);
}
Widget _buildCard(UnifiedCard card, bool isDark) {
Widget _buildCard(UnifiedCard card, bool isDark, Color themeColor) {
switch (card.type) {
case CardType.like:
return _buildLikeCard(card.data as PoetryData, isDark);
return _buildLikeCard(card.data as PoetryData, isDark, themeColor);
case CardType.note:
return _buildNoteCard(card.data as Map<String, dynamic>, isDark);
}
}
Widget _buildLikeCard(PoetryData poetry, bool isDark) {
Widget _buildLikeCard(PoetryData poetry, bool isDark, Color themeColor) {
return Container(
margin: const EdgeInsets.only(bottom: 0),
decoration: BoxDecoration(
color: isDark ? const Color(0xFF2A2A2A) : Colors.white,
borderRadius: BorderRadius.circular(10),
border: Border.all(
color: AppConstants.primaryColor.withValues(alpha: 0.2),
width: 1,
),
border: Border.all(color: themeColor.withValues(alpha: 0.2), width: 1),
boxShadow: [
BoxShadow(
color: isDark
@@ -340,7 +338,7 @@ class AllListPageState extends State<AllListPage> {
vertical: 4,
),
decoration: BoxDecoration(
color: AppConstants.primaryColor.withValues(alpha: 0.1),
color: themeColor.withValues(alpha: 0.1),
borderRadius: const BorderRadius.only(
topRight: Radius.circular(10),
bottomLeft: Radius.circular(10),
@@ -349,17 +347,13 @@ class AllListPageState extends State<AllListPage> {
child: Row(
mainAxisSize: MainAxisSize.min,
children: [
Icon(
Icons.favorite,
size: 12,
color: AppConstants.primaryColor,
),
Icon(Icons.favorite, size: 12, color: themeColor),
const SizedBox(width: 3),
Text(
'点赞诗词',
style: TextStyle(
fontSize: 11,
color: AppConstants.primaryColor,
color: themeColor,
fontWeight: FontWeight.w500,
),
),
@@ -391,17 +385,10 @@ class AllListPageState extends State<AllListPage> {
children: [
TextButton.icon(
onPressed: () => _showPoetryDetails(poetry),
icon: Icon(
Icons.visibility,
size: 14,
color: AppConstants.primaryColor,
),
icon: Icon(Icons.visibility, size: 14, color: themeColor),
label: Text(
'查看详情',
style: TextStyle(
fontSize: 12,
color: AppConstants.primaryColor,
),
style: TextStyle(fontSize: 12, color: themeColor),
),
),
const Spacer(),