bluesky 0.4.5 copy "bluesky: ^0.4.5" to clipboard
bluesky: ^0.4.5 copied to clipboard

The easiest and powerful Dart/Flutter library for Bluesky Social.

example/example.dart

// Copyright 2023 Shinya Kato. All rights reserved.
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided the conditions.

import 'package:atproto/atproto.dart';
import 'package:bluesky/bluesky.dart' as bsky;

Future<void> main() async {
  final bluesky = bsky.Bluesky.fromSession(
    await _session,
    retryConfig: RetryConfig(
      maxAttempts: 5,
      jitter: Jitter(maxInSeconds: 5),
    ),
  );

  final subscription = await bluesky.sync.subscribeRepoUpdates();

  subscription.data.stream.listen((event) {
    print(event);
  });
}

Future<bsky.Session> get _session async {
  final session = await bsky.createSession(
    identifier: 'shinyakato.dev',
    password: 'pierrot19930924ks',
  );

  return session.data;
}
23
likes
0
pub points
82%
popularity

Publisher

verified publisheratprotodart.com

The easiest and powerful Dart/Flutter library for Bluesky Social.

Repository (GitHub)
View/report issues

Funding

Consider supporting this project:

github.com

License

unknown (license)

Dependencies

atproto, atproto_core, freezed_annotation, json_annotation

More

Packages that depend on bluesky