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

discontinuedreplaced by: at_primitives

Core library for the syntax in the AT Protocol standard.

at_identifier

⚠️ 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_identifier

# Add the new package
dart pub add at_primitives

Update your imports:

// Old
import 'package:at_identifier/at_identifier.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 validate identifiers supported by AT Protocol in Dart and Flutter apps.

1.1. Getting Started ⚡ #

1.1.1. Install Library #

With Dart:

 dart pub add at_identifier

Or With Flutter:

 flutter pub add at_identifier

1.1.2. Import #

import 'package:at_identifier/at_identifier.dart';

1.1.3. Implementation #

import 'package:at_identifier/at_identifier.dart' as identifier;

void main(List<String> args) {
  identifier.isValidHandle('alice.test'); // returns true
  identifier.ensureValidHandle('alice.test'); // returns void

  identifier.isValidHandle('al!ce.test'); // returns false
  identifier.ensureValidHandle('al!ce.test'); // throws

  identifier.ensureValidDid('did:method:val'); // returns void
  identifier.ensureValidDid(':did:method:val'); // throws
}
0
likes
150
points
4.73k
downloads

Publisher

verified publisheratprotodart.com

Weekly Downloads

Core library for the syntax in the AT Protocol standard.

Topics

#atproto #bluesky #util

Documentation

API reference

License

BSD-3-Clause (license)

More

Packages that depend on at_identifier