关怀模式

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

@@ -70,9 +70,9 @@ class _RatePageState extends State<RatePage>
child: TabBar(
controller: _tabController,
tabs: _tabs.map((tab) => Tab(text: tab)).toList(),
labelColor: AppConstants.primaryColor,
unselectedLabelColor: isDark ? Colors.grey[400] : Colors.grey[600],
indicatorColor: AppConstants.primaryColor,
labelColor: _themeController.currentThemeColor,
unselectedLabelColor: isDark ? Colors.grey[400] : Colors.grey[600],
indicatorColor: _themeController.currentThemeColor,
indicatorWeight: 2,
labelStyle: const TextStyle(fontWeight: FontWeight.w600),
),
@@ -438,27 +438,29 @@ class _RatePageState extends State<RatePage>
}
Color _getActivityColor(int value) {
final themeColor = _themeController.currentThemeColor;
if (value == 0) {
return Colors.grey[100]!;
} else if (value >= 1 && value <= 5) {
return AppConstants.primaryColor.withAlpha(77);
return themeColor.withAlpha(77);
} else if (value >= 6 && value <= 20) {
return AppConstants.primaryColor.withAlpha(128);
return themeColor.withAlpha(128);
} else if (value >= 21 && value <= 100) {
return AppConstants.primaryColor.withAlpha(179);
return themeColor.withAlpha(179);
} else {
return AppConstants.primaryColor;
return themeColor;
}
}
Widget _buildSectionTitle(String title, bool isDark) {
final themeColor = _themeController.currentThemeColor;
return Row(
children: [
Container(
width: 4,
height: 20,
decoration: BoxDecoration(
color: AppConstants.primaryColor,
color: themeColor,
borderRadius: BorderRadius.circular(2),
),
),
@@ -497,9 +499,10 @@ class _RatePageState extends State<RatePage>
}
Widget _buildStatItem(String label, String value, IconData icon, bool isDark) {
final themeColor = _themeController.currentThemeColor;
return Column(
children: [
Icon(icon, color: AppConstants.primaryColor, size: 24),
Icon(icon, color: themeColor, size: 24),
const SizedBox(height: 8),
Text(
value,
@@ -512,6 +515,7 @@ class _RatePageState extends State<RatePage>
}
Widget _buildLegend(bool isDark) {
final themeColor = _themeController.currentThemeColor;
return Container(
padding: const EdgeInsets.all(16),
decoration: BoxDecoration(
@@ -531,10 +535,10 @@ class _RatePageState extends State<RatePage>
runSpacing: 8,
children: [
_buildLegendItem('无活跃', Colors.grey[100]!, isDark),
_buildLegendItem('1-5', AppConstants.primaryColor.withAlpha(77), isDark),
_buildLegendItem('6-20', AppConstants.primaryColor.withAlpha(128), isDark),
_buildLegendItem('21-100', AppConstants.primaryColor.withAlpha(179), isDark),
_buildLegendItem('100+', AppConstants.primaryColor, isDark),
_buildLegendItem('1-5', themeColor.withAlpha(77), isDark),
_buildLegendItem('6-20', themeColor.withAlpha(128), isDark),
_buildLegendItem('21-100', themeColor.withAlpha(179), isDark),
_buildLegendItem('100+', themeColor, isDark),
],
),
],