Commit 24eabbab authored by akari's avatar akari
parents bf7e72d1 53839dd5
...@@ -41,6 +41,7 @@ class MonitoringIndexContent extends StatefulWidget { ...@@ -41,6 +41,7 @@ class MonitoringIndexContent extends StatefulWidget {
class _MonitoringIndexContentState extends State<MonitoringIndexContent> { class _MonitoringIndexContentState extends State<MonitoringIndexContent> {
late final MonitoringIndexCubit _monitoringIndexCubit; late final MonitoringIndexCubit _monitoringIndexCubit;
StreamSubscription<OpenBluetoothScanEvent>? _bluetoothScanEventSub; StreamSubscription<OpenBluetoothScanEvent>? _bluetoothScanEventSub;
bool _isAlertDialogShowing = false;
@override @override
void initState() { void initState() {
...@@ -62,7 +63,8 @@ class _MonitoringIndexContentState extends State<MonitoringIndexContent> { ...@@ -62,7 +63,8 @@ class _MonitoringIndexContentState extends State<MonitoringIndexContent> {
Widget build(BuildContext context) { Widget build(BuildContext context) {
return BlocListener<MonitoringIndexCubit, MonitoringIndexState>( return BlocListener<MonitoringIndexCubit, MonitoringIndexState>(
listener: (context, state) { listener: (context, state) {
if (state.selectedAlert != null) { if (state.selectedAlert != null && !_isAlertDialogShowing) {
_isAlertDialogShowing = true;
_showAlertDetailDialog(state.selectedAlert!); _showAlertDetailDialog(state.selectedAlert!);
} }
}, },
...@@ -265,6 +267,7 @@ class _MonitoringIndexContentState extends State<MonitoringIndexContent> { ...@@ -265,6 +267,7 @@ class _MonitoringIndexContentState extends State<MonitoringIndexContent> {
child: MonitoringAlertDetailDialog(alert: alert), child: MonitoringAlertDetailDialog(alert: alert),
), ),
).then((_) { ).then((_) {
_isAlertDialogShowing = false;
_monitoringIndexCubit.clearSelectedAlert(); _monitoringIndexCubit.clearSelectedAlert();
}); });
} }
......
...@@ -50,12 +50,12 @@ class MonitoringAlertDetailDialog extends StatelessWidget { ...@@ -50,12 +50,12 @@ class MonitoringAlertDetailDialog extends StatelessWidget {
return Container( return Container(
padding: EdgeInsets.fromLTRB(40.w, 24.h, 40.w, 24.h), padding: EdgeInsets.fromLTRB(40.w, 24.h, 40.w, 24.h),
decoration: const BoxDecoration( decoration: const BoxDecoration(
border: Border( // border: Border(
bottom: BorderSide( // bottom: BorderSide(
color: Color(0xFF00D4FF), // color: Color(0xFF00D4FF),
width: 2, // width: 1,
), // ),
), // ),
), ),
child: Row( child: Row(
mainAxisAlignment: MainAxisAlignment.center, mainAxisAlignment: MainAxisAlignment.center,
......
...@@ -88,9 +88,10 @@ class VideoPlayerWidget extends StatelessWidget { ...@@ -88,9 +88,10 @@ class VideoPlayerWidget extends StatelessWidget {
), ),
), ),
// 模式切换按钮(右下角倒数第二个位置) // // 模式切换按钮(右下角倒数第二个位置)
if (onToggleMode != null && !isSwitchingMode) // if (onToggleMode != null && !isSwitchingMode)
_buildToggleModeButton(), // _buildToggleModeButton(),
// 全屏按钮(右下角最后一个位置) // 全屏按钮(右下角最后一个位置)
if (_isVideoShowing) _buildFullscreenButton(context), if (_isVideoShowing) _buildFullscreenButton(context),
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment