solid 0.2.0 copy "solid: ^0.2.0" to clipboard
solid: ^0.2.0 copied to clipboard

outdated

Solid allows use of Tim Berners-Lee's new platform for a decentralized web, https://solid.inrupt.com/, from within dart. Currently only includes solid.auth.

Solid #

Solid allows use of Tim Berners-Lee's new platform for a decentralized web, Solid, from within dart.

Currently only includes solid.auth.

Installation #

Install Solid from pub:

dependencies:
    solid: ^0.1.2

Include solid-auth-client.bundle.js in your HTML before your dart file.

<script src="solid-auth-client.bundle.js"></script>
<script src="main.dart.js"></script>

You can find solid-auth-client.bundle.js here.

if you're also using RDFLib, make sure to include rdflib.min.js.

In your dart code, import

import 'package:solid/solid.dart' as solid;

To use RDFLib, import

import 'package:solid/rdflib.dart' as $rdf;

Warning: In the future, rdflib may be moved to its own package.

Follow the Official Solid Documentation!

Differences from JavaScript #

Currently, logging in from JavaScript is written as

solid.auth.popupLogin({popupUri:'popup.html'});

Whereas in Dart, you write

solid.Auth.popupLogin(solid.LoginOptions(popupUri:'popup.html'));

RDFLib Differences #

Due issues with JavaScript Promise Interop, when using Fetcher.load, it must be wrapped in promiseToFuture (dart:html).

For example, in JavaScript, you write:

await fetcher.load(person);

In dart, you write:

await promiseToFuture(fetcher.load(person));
0
likes
0
pub points
0%
popularity

Publisher

unverified uploader

Solid allows use of Tim Berners-Lee's new platform for a decentralized web, https://solid.inrupt.com/, from within dart. Currently only includes solid.auth.

Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

js

More

Packages that depend on solid