set static method

void set(
  1. String name,
  2. String value, {
  3. bool httpOnly = true,
  4. bool secure = false,
  5. String path = '/',
  6. Duration? maxAge,
  7. DateTime? expires,
  8. String sameSite = 'Lax',
})

Set a cookie

Implementation

static void set(
  String name,
  String value, {
  bool httpOnly = true,
  bool secure = false,
  String path = '/',
  Duration? maxAge,
  DateTime? expires,
  String sameSite = 'Lax',
}) {
  _response.setCookie(
    name,
    value,
    path: path,
    httpOnly: httpOnly,
    secure: secure,
    maxAge: maxAge?.inSeconds,
    expires: expires,
    sameSite: sameSite,
  );
}