cooky 1.0.1

Cooky #

An HTTP Cookies implementation for the client.

Usage #

import 'package:cooky/cooky.dart' as cookie;

setCookie() async {
  cookie.set('key', 'value');
}

See our example/example.dart for a more complete example.

Changelog #

1.0.1 #

  • Minor change: Use DateTime.now().add(maxAge) instead of building the date with DateTime.fromMillisecondsSinceEpoch(/* etc... */)

1.0.0 #

  • Initial commit

example/example.dart

import 'package:cooky/cooky.dart' as cookie;

main() async {
  // Create a session cookie:
  cookie.set('key', 'value');

  // Create a cookie that expires in a week:
  cookie.set('key', 'value', maxAge: new Duration(days: 7));

  // Create a cookie that is valid for a certain path and domain:
  cookie.set('key', 'value', path: '/test', domain: 'test.com');

  // Read a cookie:
  var value = cookie.get('key');
  print(value);

  // Delete a cookie:
  cookie.remove('key');
}

Use this package as a library

1. Depend on it

Add this to your package's pubspec.yaml file:


dependencies:
  cooky: ^1.0.1

2. Install it

You can install packages from the command line:

with pub:


$ pub get

Alternatively, your editor might support pub get. Check the docs for your editor to learn more.

3. Import it

Now in your Dart code, you can use:


import 'package:cooky/cooky.dart';
  
Popularity:
Describes how popular the package is relative to other packages. [more]
67
Health:
Code health derived from static analysis. [more]
100
Maintenance:
Reflects how tidy and up-to-date the package is. [more]
82
Overall:
Weighted score of the above. [more]
80
Learn more about scoring.

We analyzed this package on Aug 22, 2019, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.4.0
  • pana: 0.12.19

Platforms

Detected platforms: web

Primary library: package:cooky/cooky.dart with components: html.

Maintenance suggestions

The package description is too short. (-14 points)

Add more detail to the description field of pubspec.yaml. Use 60 to 180 characters to describe the package, what it does, and its target use case.

Package is getting outdated. (-3.56 points)

The package was last published 54 weeks ago.

Dependencies

Package Constraint Resolved Available
Direct dependencies
Dart SDK >=1.22.0 <3.0.0
intl ^0.15.7 0.15.8
Transitive dependencies
path 1.6.4
Dev dependencies
grind_publish ^0.0.2
grinder ^0.8.3
test ^1.3.0