1.录像页面,根据个人赛和团队赛 动态 录像页标题

2.录像结束弹窗按钮文本修改
This commit is contained in:
2026-07-29 11:18:58 +08:00
parent a19d9dfa6d
commit d4920e2b98
3 changed files with 28 additions and 8 deletions
+12 -4
View File
@@ -2,7 +2,6 @@ import 'package:flutter/material.dart';
import 'package:flutter/services.dart'; import 'package:flutter/services.dart';
import 'package:flutter_riverpod/flutter_riverpod.dart'; import 'package:flutter_riverpod/flutter_riverpod.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:recording_tool/app/config/app_config.dart';
import 'package:recording_tool/app/router/app_navigator.dart'; import 'package:recording_tool/app/router/app_navigator.dart';
import 'package:recording_tool/core/utils/util_search_nasIp.dart'; import 'package:recording_tool/core/utils/util_search_nasIp.dart';
import 'package:recording_tool/features/events/model/model_event_info.dart'; import 'package:recording_tool/features/events/model/model_event_info.dart';
@@ -54,6 +53,14 @@ class _EventInfoPageState extends ConsumerState<EventInfoPage> {
time: item.scheduleTime, time: item.scheduleTime,
playerName: item.playerName, playerName: item.playerName,
playerPhone: item.playerPhone, playerPhone: item.playerPhone,
isTeam: item.opponentId != '0',
opponentName: item.opponentName,
teamLeaderName: item.teamMembers.isNotEmpty
? item.teamMembers
.firstWhere((member) => member.isLeader)
.name
.trim()
: '',
), ),
streamUrl: streamUrl, streamUrl: streamUrl,
), ),
@@ -483,9 +490,10 @@ String _formatTitle(EventRegistrationItem item) {
} }
String _formatVenue(EventRegistrationItem item, int scheduleIndex) { String _formatVenue(EventRegistrationItem item, int scheduleIndex) {
final place = item.matchPlace.trim(); return item.matchPlace.trim();
if (place.isEmpty) return '$scheduleIndex号场馆$scheduleIndex区'; // final place = item.matchPlace.trim();
return '$place号场馆$scheduleIndex区'; // if (place.isEmpty) return '$scheduleIndex号场馆$scheduleIndex区';
// return '$place号场馆$scheduleIndex区';
} }
String _formatScheduleTime(EventRegistrationItem item) { String _formatScheduleTime(EventRegistrationItem item) {
@@ -9,6 +9,11 @@ class RecordingContext {
required this.playerPhone, required this.playerPhone,
this.laneNo, this.laneNo,
this.status, this.status,
this.isTeam = false,
/// 对方队长
this.opponentName = '',
this.teamLeaderName = '',
}); });
const RecordingContext.empty() const RecordingContext.empty()
@@ -20,7 +25,10 @@ class RecordingContext {
playerName = '', playerName = '',
playerPhone = '', playerPhone = '',
laneNo = null, laneNo = null,
status = null; status = null,
isTeam = false,
opponentName = '',
teamLeaderName = '';
final String eventTitle; final String eventTitle;
final String matchName; final String matchName;
@@ -31,8 +39,12 @@ class RecordingContext {
final String playerPhone; final String playerPhone;
final String? laneNo; final String? laneNo;
final String? status; final String? status;
final bool isTeam;
final String opponentName;
final String teamLeaderName;
String get title => '$matchName $group'; String get title =>
isTeam ? '$teamLeaderName 队伍 vs $opponentName 队伍' : '$playerName $group';
String get address => venue; String get address => venue;
@@ -11,8 +11,8 @@ Future<void> showRecordingSavedDialog(
return RecordDialog.showDouble( return RecordDialog.showDouble(
context, context,
title: '本轮比赛视频已保存\n请选择后续录制信息', title: '本轮比赛视频已保存\n请选择后续录制信息',
leftText: '续本轮', leftText: '当前选手',
rightText: '制新轮', rightText: '新选手',
onLeftPressed: onContinueRound, onLeftPressed: onContinueRound,
onRightPressed: onRecordNewRound, onRightPressed: onRecordNewRound,
barrierDismissible: false, barrierDismissible: false,