cooky 1.0.2

  • Readme
  • Changelog
  • Example
  • Installing
  • 79

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.1.0 #

  • Update all dependencies and fix warnings
  • Make the formatDate function public
  • Remove the intl dependency
  • Fix weekday Thi -> Thu

1.0.1 #

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

1.0.0 #

  • Initial commit


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

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

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

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

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

  // Delete a cookie:

Use this package as a library

1. Depend on it

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

  cooky: ^1.0.2

2. Install it

You can install packages from the command line:

with pub:

$ pub get

with Flutter:

$ flutter pub get

Alternatively, your editor might support pub get or flutter 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';
Describes how popular the package is relative to other packages. [more]
Code health derived from static analysis. [more]
Reflects how tidy and up-to-date the package is. [more]
Weighted score of the above. [more]
Learn more about scoring.

We analyzed this package on Apr 7, 2020, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.7.1
  • pana: 0.13.7

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 Constraint Resolved Available
Direct dependencies
Dart SDK >=1.22.0 <3.0.0
Dev dependencies
grind_publish ^1.0.0
grinder ^0.8.3
pedantic ^1.9.0
test ^1.3.0