chore: 清理废弃代码和 lint 警告
- 删除旧的 _chip 方法(服药次数改用滚轮后遗留) - 移除多余的 ! 非空断言
This commit is contained in:
@@ -306,7 +306,7 @@ class _DoctorReportDetailPageState
|
|||||||
width: double.infinity,
|
width: double.infinity,
|
||||||
child: OutlinedButton.icon(
|
child: OutlinedButton.icon(
|
||||||
onPressed: () {
|
onPressed: () {
|
||||||
pushRoute(ref, 'reportOriginal', params: {'url': fileUrl!, 'title': '原始报告'});
|
pushRoute(ref, 'reportOriginal', params: {'url': fileUrl, 'title': '原始报告'});
|
||||||
},
|
},
|
||||||
icon: const Icon(Icons.visibility, size: 18),
|
icon: const Icon(Icons.visibility, size: 18),
|
||||||
label: const Text('查看原始报告'),
|
label: const Text('查看原始报告'),
|
||||||
|
|||||||
@@ -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) =>
|
Widget _dateField(String label, DateTime val, ValueChanged<DateTime> cb) =>
|
||||||
Column(
|
Column(
|
||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
|
|||||||
Reference in New Issue
Block a user