cookie method

Response cookie(
  1. String name,
  2. String value, {
  3. String? domain,
  4. String? path = '/',
  5. DateTime? expires,
  6. Duration? maxAge,
  7. bool httpOnly = false,
  8. bool secure = false,
  9. String? sameSite,
})

Sets a cookie (convenience method).

Implementation

Response cookie(
  String name,
  String value, {
  String? domain,
  String? path = '/',
  DateTime? expires,
  Duration? maxAge,
  bool httpOnly = false,
  bool secure = false,
  String? sameSite,
}) {
  _cookies.set(
    name,
    value,
    domain: domain,
    path: path,
    expires: expires,
    maxAge: maxAge,
    httpOnly: httpOnly,
    secure: secure,
    sameSite: sameSite,
  );
  return this;
}