This commit is contained in:
Developer
2026-04-03 03:26:06 +08:00
parent 3063deb34c
commit cba04235c8
49 changed files with 3955 additions and 1421 deletions

View File

@@ -61,30 +61,30 @@ class CareModeToggle extends StatelessWidget {
final themeController = Get.find<ThemeController>();
final primaryColor = themeController.currentThemeColor;
return Container(
padding: const EdgeInsets.symmetric(horizontal: 16, vertical: 8),
margin: const EdgeInsets.all(16),
decoration: BoxDecoration(
color: isDark ? const Color(0xFF2A2A2A) : Colors.white,
borderRadius: BorderRadius.circular(12),
boxShadow: [
BoxShadow(
color: Colors.black.withAlpha(isDark ? 40 : 20),
blurRadius: 8,
offset: const Offset(0, 2),
),
],
),
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Row(
children: [
Icon(Icons.people, color: primaryColor, size: 20),
const SizedBox(width: 12),
GestureDetector(
onTap: () => Get.to(() => const CarePage()),
child: Text(
return GestureDetector(
onTap: () => Get.to(() => const CarePage()),
child: Container(
padding: const EdgeInsets.symmetric(horizontal: 16, vertical: 8),
margin: const EdgeInsets.all(16),
decoration: BoxDecoration(
color: isDark ? const Color(0xFF2A2A2A) : Colors.white,
borderRadius: BorderRadius.circular(12),
boxShadow: [
BoxShadow(
color: Colors.black.withAlpha(isDark ? 40 : 20),
blurRadius: 8,
offset: const Offset(0, 2),
),
],
),
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Row(
children: [
Icon(Icons.people, color: primaryColor, size: 20),
const SizedBox(width: 12),
Text(
'关怀',
style: TextStyle(
fontSize: 16,
@@ -92,16 +92,21 @@ class CareModeToggle extends StatelessWidget {
color: isDark ? Colors.white : Colors.black,
),
),
],
),
GestureDetector(
onTap: onToggle,
child: Switch(
value: isEnabled,
onChanged: (_) => onToggle(),
activeColor: primaryColor,
inactiveTrackColor: isDark
? Colors.grey[700]
: Colors.grey[300],
),
],
),
Switch(
value: isEnabled,
onChanged: (_) => onToggle(),
activeColor: primaryColor,
inactiveTrackColor: isDark ? Colors.grey[700] : Colors.grey[300],
),
],
),
],
),
),
);
}