crdt 5.1.2 copy "crdt: ^5.1.2" to clipboard
crdt: ^5.1.2 copied to clipboard

Dart implementation of Conflict-free Replicated Data Types (CRDTs).

example/example.dart

import 'package:crdt/map_crdt.dart';

void main() {
  var crdt1 = MapCrdt(['table']);
  var crdt2 = MapCrdt(['table']);

  print('Inserting 2 records in crdt1…');
  crdt1.put('table', 'a', 1);
  crdt1.put('table', 'b', 1);

  print('crdt1: ${crdt1.getMap('table')}');

  print('\nInserting a conflicting record in crdt2…');
  crdt2.put('table', 'a', 2);

  print('crdt2: ${crdt2.getMap('table')}');

  print('\nMerging crdt2 into crdt1…');
  crdt1.merge(crdt2.getChangeset());

  print('crdt1: ${crdt1.getMap('table')}');
}
43
likes
140
pub points
70%
popularity

Publisher

verified publishercachapa.net

Dart implementation of Conflict-free Replicated Data Types (CRDTs).

Repository (GitHub)
View/report issues
Contributing

Documentation

API reference

License

Apache-2.0 (LICENSE)

Dependencies

meta, uuid

More

Packages that depend on crdt