修复电量的取数据和展示
This commit is contained in:
@@ -76,7 +76,7 @@ class RemoteControlCubit extends Cubit<RemoteControlState> {
|
|||||||
emit(state.copyWith(
|
emit(state.copyWith(
|
||||||
runningStatusModel: newStatus,
|
runningStatusModel: newStatus,
|
||||||
voltage:int.tryParse(newStatus.voltage) ?? 0,
|
voltage:int.tryParse(newStatus.voltage) ?? 0,
|
||||||
battery: int.tryParse(newStatus.voltage) ?? 0,
|
battery: int.tryParse(newStatus.battery) ?? 0,
|
||||||
// 如果需要同步其他字段,在这里添加
|
// 如果需要同步其他字段,在这里添加
|
||||||
// controlMode: newStatus.controlMode,
|
// controlMode: newStatus.controlMode,
|
||||||
));
|
));
|
||||||
@@ -238,8 +238,7 @@ class RemoteControlCubit extends Cubit<RemoteControlState> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void toggleLeftPip() => emit(state.copyWith(showLeftPip: !state.showLeftPip));
|
void toggleLeftPip() => emit(state.copyWith(showLeftPip: !state.showLeftPip));
|
||||||
void toggleRightPip() =>
|
void toggleRightPip() => emit(state.copyWith(showRightPip: !state.showRightPip));
|
||||||
emit(state.copyWith(showRightPip: !state.showRightPip));
|
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Future<void> close() {
|
Future<void> close() {
|
||||||
|
|||||||
Reference in New Issue
Block a user