map_history 1.0.3 copy "map_history: ^1.0.3" to clipboard
map_history: ^1.0.3 copied to clipboard

A Map implementation with history and rollback support for entries, keys and values.

map_history #

pub package Null Safety Codecov CI GitHub Tag New Commits Last Commits Pull Requests Code size License

A Map implementation with history and rollback support for entries, keys and values.

Usage #

Here's a simple usage example:

import 'package:map_history/map_history.dart';

void main() {
  var m = MapHistory<int, String>();

  m[1] = 'a';
  m[2] = 'b';
  m[3] = 'c';

  var ver3 = m.version;

  print('Version: $ver3 >> $m');

  m[2] = 'B';
  m.remove(3);

  var ver5 = m.version;
  print('Version: $ver5 >> $m');

  print('Rollback to version: $ver3');
  m.rollback(ver3);

  print('Version: ${m.version} >> $m');
}

Output:

Version: 3 >> {1: a, 2: b, 3: c}
Version: 5 >> {1: a, 2: B}
Rollback to version: 3
Version: 3 >> {1: a, 2: b, 3: c}

See Also #

Dart Map documentation.

Features and bugs #

Please file feature requests and bugs at the issue tracker.

Author #

Graciliano M. Passos: gmpassos@GitHub.

License #

Dart free & open-source license.

4
likes
140
pub points
51%
popularity

Publisher

unverified uploader

A Map implementation with history and rollback support for entries, keys and values.

Repository (GitHub)
View/report issues

Documentation

API reference

License

BSD-3-Clause (LICENSE)

Dependencies

collection, dependency_validator

More

Packages that depend on map_history