showApiScreen method

Future showApiScreen({
  1. bool isSafe = true,
})

Shows the API logger overlay screen.

isSafe - If true, only shows the overlay if logging is enabled. Defaults to true. Returns: The result of AppNavigator.home().

Implementation

Future<dynamic> showApiScreen({bool isSafe = true}) async {
  if (!isShowedApiScreen && (!isSafe || isLogEnabled)) {
    fireOnRouteApiScreen(true);
    isShowedApiScreen = true;
    final result = await AppNavigator.home();
    isShowedApiScreen = false;
    fireOnRouteApiScreen(false);
    return result;
  }
}