setCookie static method

void setCookie(
  1. HttpResponse response,
  2. String name,
  3. String value, {
  4. String? domain,
  5. String? path,
  6. DateTime? expires,
  7. Duration? maxAge,
  8. bool httpOnly = false,
  9. bool secure = false,
  10. String? sameSite,
})

Implementation

static void setCookie(
  HttpResponse response,
  String name,
  String value, {
  String? domain,
  String? path,
  DateTime? expires,
  Duration? maxAge,
  bool httpOnly = false,
  bool secure = false,
  String? sameSite,
}) =>
    Cookies.response(response).set(
      name,
      value,
      domain: domain,
      path: path,
      expires: expires,
      maxAge: maxAge,
      httpOnly: httpOnly,
      secure: secure,
      sameSite: sameSite,
    );