at_uri 0.0.1 copy "at_uri: ^0.0.1" to clipboard
at_uri: ^0.0.1 copied to clipboard

Provide standard uri supported by AT Protocol to Dart/Flutter.

example/example.dart

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

import 'package:at_uri/at_uri.dart';

void main(List<String> args) {
  final uri = AtUri.parse('at://bob.com/com.example.post/1234');

  uri.protocol; // => 'at:'
  uri.origin; // => 'at://bob.com'
  uri.hostname; // => 'bob.com'
  uri.collection; // => 'com.example.post'
  uri.rkey; // => '1234'

  ensureValidAtUri('at://user.bsky.social'); // => returns void
  ensureValidAtUri('at//did:plc:asdf123'); // => throws
}
1
likes
0
pub points
19%
popularity

Publisher

verified publisheratprotodart.com

Provide standard uri supported by AT Protocol to Dart/Flutter.

Repository (GitHub)
View/report issues

Funding

Consider supporting this project:

github.com

License

unknown (license)

Dependencies

at_identifier, nsid

More

Packages that depend on at_uri