chore: 清理废弃代码和 lint 警告

- 删除旧的 _chip 方法(服药次数改用滚轮后遗留)
- 移除多余的 ! 非空断言
This commit is contained in:
MingNian
2026-06-26 19:32:28 +08:00
parent fa2cc994fa
commit a748c316f2
2 changed files with 1 additions and 20 deletions

View File

@@ -308,25 +308,6 @@ class _MedicationEditPageState extends ConsumerState<MedicationEditPage> {
),
],
);
Widget _chip(String label, bool sel, VoidCallback onTap) => GestureDetector(
onTap: onTap,
child: Container(
padding: const EdgeInsets.symmetric(horizontal: 16, vertical: 8),
decoration: BoxDecoration(
color: sel ? Colors.white : AppColors.cardInner,
borderRadius: BorderRadius.circular(16),
border: sel ? Border.all(color: AppColors.primary, width: 1.5) : null,
),
child: Text(
label,
style: TextStyle(
fontSize: 16,
color: sel ? AppColors.primary : AppColors.textSecondary,
fontWeight: FontWeight.w500,
),
),
),
);
Widget _dateField(String label, DateTime val, ValueChanged<DateTime> cb) =>
Column(
crossAxisAlignment: CrossAxisAlignment.start,