Gun Dart

Pub Version Pub Points

Gun Dart is a Dart wrapper around the Gun JS library.

This library is almost a 1:1 port of the JS library, with some minor changes to make it more Dart-like. Gun JS is a disctributed database that can be used to build decentralized applications.

  • Web support only.
  • Null safety.
  • SEA encryption.


Add the following to your pubspec.yaml:

  gun_dart: ^0.1.1

Important : Add the following to your web/index.html:

  <!-- ... -->

  <!-- import gun js -->
  <script src=""></script>
  <script src=""></script>

  <!-- import gun js with a tested version -->
  <script src=""></script>
  <script src=""></script>

  <!-- ... -->

Getting Started

import 'package:gun_dart/gun.dart';

void main() {
  final gun = Gun(peers: ['']);
  final node = gun.get('node').get('subnode');

  node.on((data, key) {


For more examples, see :

  • the example/example.dart demo file.
  • the example/ a flutter demo project.

Authors and acknowledgment

Made by INSA Rouen Normandie students for a research project on the decentralized web.
The project was supervised by Julien VINCKEL, CEO of Potions.

Made by:

  • Julie ALLAIS
  • Paul BRIDIER
  • Louis DEVAUD
  • Louis DISPA
  • Damien GENS
  • Sarah LE MÉE

Thanks to Gun JS for their work.