dispose method

void dispose()

Dispose this LitSnackbarController.

The AnimationController of this LitSnackbarController will be dispose to ensure no TickerProvider leak will occur. Call this method on the StatefulWidget by overriding its dispose method.

Implementation

void dispose() {
  _listeners = [];
  try {
    animationController.dispose();
  } catch (e) {
    print("Failed to dispose the `LitSnackbarController`. " +
        "Have you already disposed the controller on your `StatefulWidget`?" +
        " When using the `LitScaffold`, keep in mind that most controllers " +
        "will be disposed automatically.");
  }
}