dispose method

  1. @override
Future<void> dispose()
override

Cancel all active listeners, timers, close the controllers and disposes other disposables bound with bind.

You should not use this class after it's disposal. If you only want to cancel/clear stuff, use cancelBindings.

Implementation

@override
Future<void> dispose() async {
  await _server?.close();
  return super.dispose();
}