对接远程遥控
This commit is contained in:
@@ -76,7 +76,7 @@ class DroneStationBloc extends Bloc<DroneStationEvent, DroneStationState> {
|
||||
|
||||
result.fold(
|
||||
(failure) => emit(VideoStreamError(failure.message)),
|
||||
(videoStream) => emit(VideoStreamLoaded(videoStream)),
|
||||
(videoStream) => emit(VideoStreamLoaded(videoStream, event.cameraPosition)),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
import 'package:equatable/equatable.dart';
|
||||
import '../../domain/entities/drone_station_entity.dart';
|
||||
import '../../domain/entities/video_stream_entity.dart';
|
||||
|
||||
abstract class DroneStationState extends Equatable {
|
||||
const DroneStationState();
|
||||
@@ -62,11 +63,12 @@ class VideoStreamLoading extends DroneStationState {
|
||||
|
||||
class VideoStreamLoaded extends DroneStationState {
|
||||
final VideoStreamEntity videoStream;
|
||||
final String cameraPosition;
|
||||
|
||||
const VideoStreamLoaded(this.videoStream);
|
||||
const VideoStreamLoaded(this.videoStream, this.cameraPosition);
|
||||
|
||||
@override
|
||||
List<Object?> get props => [videoStream];
|
||||
List<Object?> get props => [videoStream, cameraPosition];
|
||||
}
|
||||
|
||||
class VideoStreamError extends DroneStationState {
|
||||
@@ -76,4 +78,4 @@ class VideoStreamError extends DroneStationState {
|
||||
|
||||
@override
|
||||
List<Object?> get props => [message];
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user