close method
Close the server and clean up any resources
Call this if you are shutting down the server but continuing to run the app.
Implementation
Future<void> close({bool force = true}) async {
if (server != null) {
await server!.close(force: force);
}
}