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

outdated

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

example/map_history_example.dart

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}
4
likes
0
points
2.1k
downloads

Publisher

unverified uploader

Weekly Downloads

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

Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

collection, dependency_validator

More

Packages that depend on map_history