lexicon 0.1.1 copy "lexicon: ^0.1.1" to clipboard
lexicon: ^0.1.1 copied to clipboard

AT Protocol standard Lexicon objects for Dart and Flutter.

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:lexicon/lexicon.dart';

void main() {
  final lexicon = LexiconDoc.fromJson({
    'lexicon': 1,
    'id': 'app.bsky.feed.like',
    'defs': {
      'main': {
        'type': 'record',
        'description': 'A declaration of a like.',
        'key': 'tid',
        'record': {
          'type': 'object',
          'required': ['subject', 'createdAt'],
          'properties': {
            'subject': {'type': 'ref', 'ref': 'com.atproto.repo.strongRef'},
            'createdAt': {'type': 'string', 'format': 'datetime'}
          }
        }
      }
    }
  });

  print(lexicon.id);
  print(lexicon.description);
  print(lexicon.defs);
}
1
likes
0
points
86
downloads

Publisher

verified publisheratprotodart.com

Weekly Downloads

AT Protocol standard Lexicon objects for Dart and Flutter.

Homepage
Repository (GitHub)
View/report issues

Funding

Consider supporting this project:

github.com

License

unknown (license)

Dependencies

freezed_annotation, json_annotation, nsid

More

Packages that depend on lexicon