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