Warning: The dart-textile library is temporarily deprecated not currently up-to-date with the Textile Hub and so will not work. If you are waiting for Dart support, please see here.
Textile's Dart client for interacting with remote Threads
Join us on our public Slack channel for news, discussions, and status updates. Check out our blog for the latest posts and announcements.
You can use this library to access and use Textile's hosted APIs.
Examples require the use of the threads-client.
import 'package:textile/textile.dart' as textile;
import 'package:threads_client/threads_client.dart' as threads;
const APP_TOKEN = '<app token>';
const DEVICE_ID = '<uuid>';
void main(List<String> args) async {
final config = textile.ThreadsConfig(APP_TOKEN, DEVICE_ID);
final client = threads.Client(config: config);
final store = await client.newStore();
print('New store $store');
}
import 'package:textile/textile.dart' as textile;
import 'package:threads_client/threads_client.dart' as threads;
const APP_TOKEN = '<app token>';
const DEVICE_ID = '<uuid>';
/*
* Run your app against a local Threads daemon for easy testing and debugging.
*/
void main(List<String> args) async {
final config = textile.ThreadsConfig(APP_TOKEN, DEVICE_ID, dev: true);
final client = threads.Client(config: config);
final store = await client.newStore();
print('New store $store');
}
import 'package:textile/textile.dart' as textile;
import 'package:threads_client/threads_client.dart' as threads;
const APP_TOKEN = '<app token>';
const DEVICE_ID = '<uuid>';
void main(List<String> args) async {
final config = textile.ThreadsConfig(APP_TOKEN, DEVICE_ID);
final client = threads.Client(config: config);
final store = await client.newStore();
print('New store $store');
}
This project is a work in progress. As such, there's a few things you can do right now to help out:
- Ask questions! We'll try to help. Be sure to drop a note (on the above issue) if there is anything you'd like to work on and we'll update the issue to let others know. Also get in touch on Slack.
- Open issues, file issues, submit pull requests!
- Perform code reviews. More eyes will help a) speed the project along b) ensure quality and c) reduce possible future bugs.
- Take a look at the code. Contributions here that would be most helpful are top-level comments about how it should look based on your understanding. Again, the more eyes the better.
- Add tests. There can never be enough tests.
Before you get started, be sure to read our contributors guide and our contributor covenant code of conduct.