redirect method

Future redirect(
  1. String url, [
  2. int? statusCode
])

Implementation

Future redirect(String url, [int? statusCode]) async {

  try{
    res?.redirect(Uri(
      host: res?.connectionInfo?.remoteAddress.address,
      port: res?.connectionInfo?.localPort,
      path: url),);
  } catch(e){
    throw CustomException(e.toString()).showError();
  }


}