关怀模式
This commit is contained in:
@@ -78,17 +78,18 @@ class _LocalNotesListState extends State<LocalNotesList> {
|
||||
Widget build(BuildContext context) {
|
||||
return Obx(() {
|
||||
final isDark = _themeController.isDarkMode;
|
||||
final themeColor = _themeController.currentThemeColor;
|
||||
|
||||
if (_isLoadingNotes && _notes.isEmpty) {
|
||||
return Center(
|
||||
child: CircularProgressIndicator(
|
||||
color: isDark ? Colors.white : AppConstants.primaryColor,
|
||||
color: isDark ? Colors.white : themeColor,
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
if (_notes.isEmpty) {
|
||||
return _buildEmptyNotes(isDark);
|
||||
return _buildEmptyNotes(isDark, themeColor);
|
||||
}
|
||||
|
||||
return RefreshIndicator(
|
||||
@@ -107,7 +108,7 @@ class _LocalNotesListState extends State<LocalNotesList> {
|
||||
return _buildBottomIndicator(isDark);
|
||||
}
|
||||
final note = _notes[index];
|
||||
return _buildNoteCard(note, isDark);
|
||||
return _buildNoteCard(note, isDark, themeColor);
|
||||
},
|
||||
),
|
||||
);
|
||||
@@ -145,7 +146,7 @@ class _LocalNotesListState extends State<LocalNotesList> {
|
||||
);
|
||||
}
|
||||
|
||||
Widget _buildEmptyNotes(bool isDark) {
|
||||
Widget _buildEmptyNotes(bool isDark, Color themeColor) {
|
||||
return Center(
|
||||
child: Column(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
@@ -176,7 +177,7 @@ class _LocalNotesListState extends State<LocalNotesList> {
|
||||
);
|
||||
}
|
||||
|
||||
Widget _buildNoteCard(Map<String, dynamic> note, bool isDark) {
|
||||
Widget _buildNoteCard(Map<String, dynamic> note, bool isDark, Color themeColor) {
|
||||
final title = note['title'] as String? ?? '';
|
||||
final content = note['content'] as String? ?? '';
|
||||
final timeStr = note['time'] as String? ?? '';
|
||||
@@ -272,7 +273,7 @@ class _LocalNotesListState extends State<LocalNotesList> {
|
||||
vertical: 2,
|
||||
),
|
||||
decoration: BoxDecoration(
|
||||
color: AppConstants.primaryColor.withValues(
|
||||
color: themeColor.withValues(
|
||||
alpha: 0.1,
|
||||
),
|
||||
borderRadius: BorderRadius.circular(10),
|
||||
@@ -281,7 +282,7 @@ class _LocalNotesListState extends State<LocalNotesList> {
|
||||
category,
|
||||
style: TextStyle(
|
||||
fontSize: 10,
|
||||
color: AppConstants.primaryColor,
|
||||
color: themeColor,
|
||||
),
|
||||
),
|
||||
),
|
||||
@@ -292,7 +293,7 @@ class _LocalNotesListState extends State<LocalNotesList> {
|
||||
child: Icon(
|
||||
Icons.lock,
|
||||
size: 16,
|
||||
color: AppConstants.primaryColor,
|
||||
color: themeColor,
|
||||
),
|
||||
),
|
||||
GestureDetector(
|
||||
@@ -305,7 +306,7 @@ class _LocalNotesListState extends State<LocalNotesList> {
|
||||
: Icons.push_pin_outlined,
|
||||
size: 16,
|
||||
color: isPinned
|
||||
? AppConstants.primaryColor
|
||||
? themeColor
|
||||
: (isDark
|
||||
? Colors.grey[500]
|
||||
: Colors.grey[400]),
|
||||
@@ -418,7 +419,7 @@ class _LocalNotesListState extends State<LocalNotesList> {
|
||||
Icon(
|
||||
Icons.lock,
|
||||
size: 28,
|
||||
color: AppConstants.primaryColor,
|
||||
color: themeColor,
|
||||
),
|
||||
const SizedBox(width: 12),
|
||||
Column(
|
||||
@@ -430,7 +431,7 @@ class _LocalNotesListState extends State<LocalNotesList> {
|
||||
'已锁定',
|
||||
style: TextStyle(
|
||||
fontSize: 14,
|
||||
color: AppConstants.primaryColor,
|
||||
color: themeColor,
|
||||
fontWeight: FontWeight.w500,
|
||||
),
|
||||
),
|
||||
|
||||
Reference in New Issue
Block a user