- 后端: 新增 AttachmentContextBuilder 解析图片/PDF 摘要并拼入 LLM 上下文; ai_chat_endpoints 扩展附件接口; 新增 ReportAnalysisService - 前端: 新增历史会话页与 conversation_history_provider; chat 链路支持附件展示与回放 - UI: 重构 medication_checkin / notification_center / profile / health_drawer 等多页面 - 配置: api_client baseUrl 适配当前 WiFi IP
49 lines
1.4 KiB
Dart
49 lines
1.4 KiB
Dart
import 'package:flutter/material.dart';
|
|
|
|
class DrawerShell extends StatelessWidget {
|
|
final double widthFactor;
|
|
final Widget child;
|
|
|
|
const DrawerShell({super.key, required this.child, this.widthFactor = 0.84});
|
|
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
return Drawer(
|
|
width: MediaQuery.sizeOf(context).width * widthFactor,
|
|
backgroundColor: Colors.transparent,
|
|
elevation: 0,
|
|
child: ClipRRect(
|
|
borderRadius: const BorderRadius.horizontal(right: Radius.circular(28)),
|
|
child: Stack(
|
|
children: [
|
|
Positioned.fill(
|
|
child: Image.asset(
|
|
'assets/branding/drawer_background_v1.png',
|
|
fit: BoxFit.cover,
|
|
alignment: Alignment.centerLeft,
|
|
),
|
|
),
|
|
Positioned.fill(
|
|
child: DecoratedBox(
|
|
decoration: BoxDecoration(
|
|
gradient: LinearGradient(
|
|
begin: Alignment.topCenter,
|
|
end: Alignment.bottomCenter,
|
|
colors: [
|
|
Colors.white.withValues(alpha: 0.12),
|
|
Colors.white.withValues(alpha: 0.42),
|
|
Colors.white.withValues(alpha: 0.72),
|
|
],
|
|
stops: const [0.0, 0.48, 1.0],
|
|
),
|
|
),
|
|
),
|
|
),
|
|
child,
|
|
],
|
|
),
|
|
),
|
|
);
|
|
}
|
|
}
|