crdt 5.1.3 copy "crdt: ^5.1.3" to clipboard
crdt: ^5.1.3 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')}');
}
64
likes
160
pub points
72%
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