biscuits 2.1.0

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

Biscuits.dart

Runtime Release License Coverage Build

Service for interacting with the HTTP cookies in Dart.

Documentation

Development

License

Biscuits.dart is distributed under the MIT License.

Changelog

Version 2.1.0

  • Updated the package dependencies.
  • Updated the URL of the Git repository.

Version 2.0.0

  • Breaking change: raised the Dart SDK constraint.
  • Updated the package dependencies.

Version 1.3.0

  • Updated the package dependencies.

Version 1.2.0

  • Updated the package dependencies.

Version 1.1.0

  • The Cookies constructor now accepts a Document instance instead of an HtmlDocument one.
  • The SimpleChange class is now generic.
  • Added a defaultValue argument to the get() and getObject() methods of the Cookies class.
  • Added the Cookies.toJson() method.
  • Added new unit tests.

Version 1.0.0

  • First stable release.
  • Raised the Dart SDK constraint.
  • Updated the package dependencies.

Version 0.2.0

  • Raised the Dart SDK constraint.
  • Updated the package dependencies.

Version 0.1.0

  • Initial release.

example/main.dart

import 'package:biscuits/biscuits.dart';

/// Tests the cookie service.
void main() {
  final cookies = Cookies();

  // Write the cookies.
  print(cookies.containsKey('foo')); // false
  print(cookies.containsKey('baz')); // false
  print(cookies.length); // 0

  cookies['foo'] = 'bar';
  print(cookies.containsKey('foo')); // true
  print(cookies.length); // 1

  cookies.setObject('baz', <String, int>{'qux': 123});
  print(cookies.containsKey('baz')); // true
  print(cookies.length); // 2

  // Read the cookies.
  print(cookies['foo'].runtimeType); // "String"
  print(cookies['foo']); // "bar"

  print(cookies.getObject('baz').runtimeType); // "_JsonMap"
  print(cookies.getObject('baz')); // {"qux": 123}
  print(cookies.getObject('baz')['qux']); // 123

  // Delete the cookies.
  cookies.remove('foo');
  print(cookies.containsKey('foo')); // false
  print(cookies.length); // 1

  cookies.clear();
  print(cookies.containsKey('baz')); // false
  print(cookies.length); // 0
}

Use this package as a library

1. Depend on it

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


dependencies:
  biscuits: ^2.1.0

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:biscuits/biscuits.dart';
  
Version Uploaded Documentation Archive
2.1.0 Jan 18, 2019 Go to the documentation of biscuits 2.1.0 Download biscuits 2.1.0 archive
2.0.0 Nov 28, 2018 Go to the documentation of biscuits 2.0.0 Download biscuits 2.0.0 archive
1.3.0 Nov 19, 2018 Go to the documentation of biscuits 1.3.0 Download biscuits 1.3.0 archive
1.2.0 Oct 2, 2018 Go to the documentation of biscuits 1.2.0 Download biscuits 1.2.0 archive
1.1.0 Aug 18, 2018 Go to the documentation of biscuits 1.1.0 Download biscuits 1.1.0 archive
1.0.0 Aug 16, 2018 Go to the documentation of biscuits 1.0.0 Download biscuits 1.0.0 archive
0.2.0 Jul 21, 2018 Go to the documentation of biscuits 0.2.0 Download biscuits 0.2.0 archive
0.1.0 Jul 9, 2018 Go to the documentation of biscuits 0.1.0 Download biscuits 0.1.0 archive
Popularity:
Describes how popular the package is relative to other packages. [more]
66
Health:
Code health derived from static analysis. [more]
100
Maintenance:
Reflects how tidy and up-to-date the package is. [more]
100
Overall:
Weighted score of the above. [more]
83
Learn more about scoring.

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

  • Dart: 2.1.0
  • pana: 0.12.10

Platforms

Detected platforms: web

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

Dependencies

Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.1.0 <3.0.0
intl ^0.15.7 0.15.7
json_annotation ^2.0.0 2.0.0
Transitive dependencies
path 1.6.2
Dev dependencies
build_runner ^1.1.3
build_test ^0.10.5
build_web_compilers ^1.0.0
coveralls ^5.1.0
grinder ^0.8.3
json_serializable ^2.0.1
test ^1.5.2