poptart_bluesky_text 0.1.0 copy "poptart_bluesky_text: ^0.1.0" to clipboard
poptart_bluesky_text: ^0.1.0 copied to clipboard

Text parsing and rich-text facet helpers for Bluesky posts, ported for Poptart.

example/main.dart

import 'package:poptart_bluesky_text/poptart_bluesky_text.dart';

Future<void> main() async {
  const text = BlueskyText('Hello @alice.test, see https://example.com/docs and #poptart.');

  assert(text.handles.single.value == '@alice.test');
  assert(text.links.single.value == 'https://example.com/docs');
  assert(text.tags.single.value == 'poptart');

  // Handle facets call com.atproto.identity.resolveHandle. Link and tag facets
  // are produced locally.
  final linkAndTagFacets = await Entities([...text.links, ...text.tags]).toFacets();

  assert(linkAndTagFacets.length == 2);
}
1
likes
160
points
98
downloads

Documentation

API reference

Publisher

verified publisherstormlightlabs.org

Weekly Downloads

Text parsing and rich-text facet helpers for Bluesky posts, ported for Poptart.

Homepage
Repository (GitHub)
View/report issues
Contributing

Topics

#atproto #bluesky #util

License

BSD-3-Clause (license)

Dependencies

characters, freezed_annotation, json_annotation, poptart_xrpc

More

Packages that depend on poptart_bluesky_text