tryCloseEmbeddedChatDashboard method

bool tryCloseEmbeddedChatDashboard()

When sized/floating, pops the in-shell dashboard route if it is on top. Returns true if a nested route was popped.

Implementation

bool tryCloseEmbeddedChatDashboard() {
  final NavigatorState? nav = chatShellNavigatorKey.currentState;
  if (nav == null || !nav.canPop()) {
    return false;
  }
  nav.pop();
  return true;
}