完成视频播放UI 调整
This commit is contained in:
Binary file not shown.
|
After Width: | Height: | Size: 3.2 KiB |
@@ -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/model/model_auth.dart';
|
||||||
import 'package:recording_tool/features/auth/view_model_auth/view_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/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_bar.dart';
|
||||||
import 'package:recording_tool/shared/widgets/app_empty_view.dart';
|
import 'package:recording_tool/shared/widgets/app_empty_view.dart';
|
||||||
import 'package:recording_tool/shared/widgets/app_toast.dart';
|
import 'package:recording_tool/shared/widgets/app_toast.dart';
|
||||||
@@ -50,26 +51,26 @@ class RecordListPage extends ConsumerWidget {
|
|||||||
|
|
||||||
return Scaffold(
|
return Scaffold(
|
||||||
backgroundColor: const Color(0xFFF5F6F8),
|
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(
|
body: SafeArea(
|
||||||
top: false,
|
top: false,
|
||||||
child: Column(
|
child: Column(
|
||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
children: [
|
children: [
|
||||||
Padding(
|
SizedBox(height: 4.h),
|
||||||
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,
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
Expanded(
|
Expanded(
|
||||||
child: visibleItems.isEmpty
|
child: visibleItems.isEmpty
|
||||||
? const AppEmptyView(message: '暂无录像内容')
|
? const AppEmptyView(message: '暂无录像内容')
|
||||||
@@ -196,7 +197,7 @@ class _DirectoryCard extends StatelessWidget {
|
|||||||
borderRadius: BorderRadius.circular(6.r),
|
borderRadius: BorderRadius.circular(6.r),
|
||||||
child: Container(
|
child: Container(
|
||||||
constraints: BoxConstraints(minHeight: 72.h),
|
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(
|
child: Row(
|
||||||
children: [
|
children: [
|
||||||
Expanded(
|
Expanded(
|
||||||
@@ -230,10 +231,22 @@ class _DirectoryCard extends StatelessWidget {
|
|||||||
),
|
),
|
||||||
),
|
),
|
||||||
SizedBox(width: 12.w),
|
SizedBox(width: 12.w),
|
||||||
Icon(
|
Row(
|
||||||
Icons.chevron_right,
|
children: [
|
||||||
size: 20.r,
|
// Text(
|
||||||
color: const Color(0xFF9AA3AF),
|
// '视频',
|
||||||
|
// 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),
|
color: Colors.black.withValues(alpha: 0.35),
|
||||||
shape: BoxShape.circle,
|
shape: BoxShape.circle,
|
||||||
),
|
),
|
||||||
child: Icon(
|
child: Image(
|
||||||
Icons.play_arrow_rounded,
|
image: AssetImage(Assets.images.imageVideoIcon.path),
|
||||||
size: 22.r,
|
fit: BoxFit.cover,
|
||||||
color: Colors.white,
|
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
|||||||
@@ -80,6 +80,10 @@ class $AssetsImagesGen {
|
|||||||
AssetGenImage get imageTeamVsBg =>
|
AssetGenImage get imageTeamVsBg =>
|
||||||
const AssetGenImage('assets/images/image_team_vs_bg.png');
|
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
|
/// File path: assets/images/image_vs.png
|
||||||
AssetGenImage get imageVs =>
|
AssetGenImage get imageVs =>
|
||||||
const AssetGenImage('assets/images/image_vs.png');
|
const AssetGenImage('assets/images/image_vs.png');
|
||||||
@@ -100,6 +104,7 @@ class $AssetsImagesGen {
|
|||||||
imageScanQrcode,
|
imageScanQrcode,
|
||||||
imageStart,
|
imageStart,
|
||||||
imageTeamVsBg,
|
imageTeamVsBg,
|
||||||
|
imageVideoIcon,
|
||||||
imageVs,
|
imageVs,
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -14,6 +14,8 @@ class AppPageBar extends StatelessWidget implements PreferredSizeWidget {
|
|||||||
this.backgroundImage,
|
this.backgroundImage,
|
||||||
this.onBack,
|
this.onBack,
|
||||||
this.actions,
|
this.actions,
|
||||||
|
this.centerTitle = true,
|
||||||
|
this.titleSpacing,
|
||||||
});
|
});
|
||||||
|
|
||||||
final String title;
|
final String title;
|
||||||
@@ -22,6 +24,10 @@ class AppPageBar extends StatelessWidget implements PreferredSizeWidget {
|
|||||||
final VoidCallback? onBack;
|
final VoidCallback? onBack;
|
||||||
final List<Widget>? actions;
|
final List<Widget>? actions;
|
||||||
|
|
||||||
|
/// 标题是否居中;false 时左对齐,紧随返回按钮。
|
||||||
|
final bool centerTitle;
|
||||||
|
final double? titleSpacing;
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Size get preferredSize => const Size.fromHeight(kToolbarHeight);
|
Size get preferredSize => const Size.fromHeight(kToolbarHeight);
|
||||||
|
|
||||||
@@ -33,7 +39,8 @@ class AppPageBar extends StatelessWidget implements PreferredSizeWidget {
|
|||||||
backgroundColor: Colors.transparent,
|
backgroundColor: Colors.transparent,
|
||||||
elevation: 0,
|
elevation: 0,
|
||||||
scrolledUnderElevation: 0,
|
scrolledUnderElevation: 0,
|
||||||
centerTitle: true,
|
centerTitle: centerTitle,
|
||||||
|
titleSpacing: titleSpacing,
|
||||||
systemOverlayStyle: SystemUiOverlayStyle.light,
|
systemOverlayStyle: SystemUiOverlayStyle.light,
|
||||||
flexibleSpace: SizedBox.expand(
|
flexibleSpace: SizedBox.expand(
|
||||||
child: Image.asset(
|
child: Image.asset(
|
||||||
|
|||||||
Reference in New Issue
Block a user