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

discontinuedreplaced by: at_primitives

Core library for parsing AT URI in the AT Protocol standard.

at_uri

⚠️ DEPRECATED - Use at_primitives instead

⚠️ Package Deprecated #

This package has been deprecated and is no longer maintained. All functionality has been moved to the at_primitives package.

Migration Guide #

Please migrate to the at_primitives package:

# Remove the old package
dart pub remove at_uri

# Add the new package
dart pub add at_primitives

Update your imports:

// Old
import 'package:at_uri/at_uri.dart';

// New
import 'package:at_primitives/at_primitives.dart';

The API remains the same, so no code changes are required beyond updating the import statement.


1. Guide 🌎 (Legacy Documentation) #

This library provides the easiest way to use AT Uri supported by AT Protocol in Dart and Flutter apps.

1.1. Getting Started ⚡ #

1.1.1. Install Library #

With Dart:

 dart pub add at_uri

Or With Flutter:

 flutter pub add at_uri

1.1.2. Import #

import 'package:at_uri/at_uri.dart';

1.1.3. Implementation #

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
140
points
4.91k
downloads

Publisher

verified publisheratprotodart.com

Weekly Downloads

Core library for parsing AT URI in the AT Protocol standard.

Topics

#atproto #bluesky #uri #util

Documentation

API reference

License

BSD-3-Clause (license)

Dependencies

at_identifier, nsid

More

Packages that depend on at_uri