diff --git a/assets/images/image_video_icon.png b/assets/images/image_video_icon.png new file mode 100644 index 0000000..1b332ac Binary files /dev/null and b/assets/images/image_video_icon.png differ diff --git a/lib/features/scan_qrcode/pages/page_record_list.dart b/lib/features/scan_qrcode/pages/page_record_list.dart index e004310..74b0269 100644 --- a/lib/features/scan_qrcode/pages/page_record_list.dart +++ b/lib/features/scan_qrcode/pages/page_record_list.dart @@ -10,6 +10,7 @@ import 'package:recording_tool/app/router/app_navigator.dart'; import 'package:recording_tool/features/auth/model/model_auth.dart'; import 'package:recording_tool/features/auth/view_model_auth/view_model_auth.dart'; import 'package:recording_tool/features/scan_qrcode/pages/page_record_video_player.dart'; +import 'package:recording_tool/gen/assets.gen.dart'; import 'package:recording_tool/shared/widgets/app_bar.dart'; import 'package:recording_tool/shared/widgets/app_empty_view.dart'; import 'package:recording_tool/shared/widgets/app_toast.dart'; @@ -50,26 +51,26 @@ class RecordListPage extends ConsumerWidget { return Scaffold( backgroundColor: const Color(0xFFF5F6F8), - appBar: AppPageBar(title: '查看录像'), + appBar: AppPageBar( + centerTitle: false, + titleSpacing: 0, + titleWidget: Text( + breadcrumbs.join(' > '), + maxLines: 1, + overflow: TextOverflow.ellipsis, + style: TextStyle( + color: Colors.white, + fontSize: 15.sp, + fontWeight: FontWeight.w500, + ), + ), + ), body: SafeArea( top: false, child: Column( crossAxisAlignment: CrossAxisAlignment.start, children: [ - Padding( - padding: EdgeInsets.fromLTRB(12.w, 12.h, 12.w, 4.h), - child: Text( - breadcrumbs.join(' > '), - maxLines: 1, - overflow: TextOverflow.ellipsis, - style: TextStyle( - fontSize: 14.sp, - height: 1.2, - color: const Color(0xFF30343A), - fontWeight: FontWeight.w700, - ), - ), - ), + SizedBox(height: 4.h), Expanded( child: visibleItems.isEmpty ? const AppEmptyView(message: '暂无录像内容') @@ -196,7 +197,7 @@ class _DirectoryCard extends StatelessWidget { borderRadius: BorderRadius.circular(6.r), child: Container( constraints: BoxConstraints(minHeight: 72.h), - padding: EdgeInsets.fromLTRB(12.w, 12.h, 14.w, 12.h), + padding: EdgeInsets.fromLTRB(20.w, 12.h, 14.w, 12.h), child: Row( children: [ Expanded( @@ -230,10 +231,22 @@ class _DirectoryCard extends StatelessWidget { ), ), SizedBox(width: 12.w), - Icon( - Icons.chevron_right, - size: 20.r, - color: const Color(0xFF9AA3AF), + Row( + children: [ + // Text( + // '视频', + // style: TextStyle( + // fontSize: 14.sp, + // color: const Color(0xFF358BFE), + // fontWeight: FontWeight.w600, + // ), + // ), + Icon( + Icons.chevron_right, + size: 20.r, + color: const Color(0xFF9AA3AF), + ), + ], ), ], ), @@ -368,10 +381,9 @@ class _VideoThumbnailState extends State<_VideoThumbnail> { color: Colors.black.withValues(alpha: 0.35), shape: BoxShape.circle, ), - child: Icon( - Icons.play_arrow_rounded, - size: 22.r, - color: Colors.white, + child: Image( + image: AssetImage(Assets.images.imageVideoIcon.path), + fit: BoxFit.cover, ), ), ), diff --git a/lib/gen/assets.gen.dart b/lib/gen/assets.gen.dart index 3ce94ee..1d2179d 100644 --- a/lib/gen/assets.gen.dart +++ b/lib/gen/assets.gen.dart @@ -80,6 +80,10 @@ class $AssetsImagesGen { AssetGenImage get imageTeamVsBg => const AssetGenImage('assets/images/image_team_vs_bg.png'); + /// File path: assets/images/image_video_icon.png + AssetGenImage get imageVideoIcon => + const AssetGenImage('assets/images/image_video_icon.png'); + /// File path: assets/images/image_vs.png AssetGenImage get imageVs => const AssetGenImage('assets/images/image_vs.png'); @@ -100,6 +104,7 @@ class $AssetsImagesGen { imageScanQrcode, imageStart, imageTeamVsBg, + imageVideoIcon, imageVs, ]; } diff --git a/lib/shared/widgets/app_bar.dart b/lib/shared/widgets/app_bar.dart index a04eed1..5af0981 100644 --- a/lib/shared/widgets/app_bar.dart +++ b/lib/shared/widgets/app_bar.dart @@ -14,6 +14,8 @@ class AppPageBar extends StatelessWidget implements PreferredSizeWidget { this.backgroundImage, this.onBack, this.actions, + this.centerTitle = true, + this.titleSpacing, }); final String title; @@ -22,6 +24,10 @@ class AppPageBar extends StatelessWidget implements PreferredSizeWidget { final VoidCallback? onBack; final List? actions; + /// 标题是否居中;false 时左对齐,紧随返回按钮。 + final bool centerTitle; + final double? titleSpacing; + @override Size get preferredSize => const Size.fromHeight(kToolbarHeight); @@ -33,7 +39,8 @@ class AppPageBar extends StatelessWidget implements PreferredSizeWidget { backgroundColor: Colors.transparent, elevation: 0, scrolledUnderElevation: 0, - centerTitle: true, + centerTitle: centerTitle, + titleSpacing: titleSpacing, systemOverlayStyle: SystemUiOverlayStyle.light, flexibleSpace: SizedBox.expand( child: Image.asset(