onCloseCurrentServerIfExistsEvent method
void
onCloseCurrentServerIfExistsEvent()
Implementation
void onCloseCurrentServerIfExistsEvent() async {
if (state.isServerActive) {
if (state.server != null) {
await state.server!.close(
force: true,
);
emit(
state.copyWith(
isServerActive: false,
server: null,
),
);
}
}
}