mastodon_dart 0.1.4+3 copy "mastodon_dart: ^0.1.4+3" to clipboard
mastodon_dart: ^0.1.4+3 copied to clipboard

outdated

A Dart library for accessing the Mastodon API. Use in conjunction with mastodon_flutter to build a Flutter Mastodon app.

example/lib/main.dart

import 'dart:io';

import 'package:mastodon_dart/mastodon_dart.dart';
import 'package:web_socket_channel/io.dart';

main() async {
  final baseUrl = Uri.parse(Platform.environment["BASE_URL"]);
  final token = Platform.environment["TOKEN"];

  final mastodon = Mastodon(
    baseUrl,
    websocketFactory: (uri) => IOWebSocketChannel.connect(uri),
  )..token = token;

  mastodon.publicTimelineStream().listen(print);
}
7
likes
0
pub points
0%
popularity

Publisher

unverified uploader

A Dart library for accessing the Mastodon API. Use in conjunction with mastodon_flutter to build a Flutter Mastodon app.

Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

http, json_annotation, rxdart, web_socket_channel

More

Packages that depend on mastodon_dart