cooky 1.0.1

  • README.md
  • CHANGELOG.md
  • Example
  • Installing
  • Versions
  • 84

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';
  
Version Uploaded Documentation Archive
1.0.1 Aug 9, 2018 Go to the documentation of cooky 1.0.1 Download cooky 1.0.1 archive
1.0.0 Aug 9, 2018 Go to the documentation of cooky 1.0.0 Download cooky 1.0.0 archive
Popularity:
Describes how popular the package is relative to other packages. [more]
76
Health:
Code health derived from static analysis. [more]
100
Maintenance:
Reflects how tidy and up-to-date the package is. [more]
80
Overall:
Weighted score of the above. [more]
84
Learn more about scoring.

We analyzed this package on Oct 10, 2018, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.0.0
  • pana: 0.12.4

Platforms

Detected platforms: web

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

Maintenance suggestions

The description is too short. (-20 points)

Add more detail about the package, what it does and what is its target use case. Try to write at least 60 characters.

Dependencies

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