artifact 1.0.26 copy "artifact: ^1.0.26" to clipboard
artifact: ^1.0.26 copied to clipboard

Data Modeling for the local madman

example/lib/example.dart

import 'package:artifact/artifact.dart';

const Artifact model = Artifact(compression: true, reflection: true);

class SomeAnnotation {
  final bool thing;

  const SomeAnnotation({this.thing = false});
}

@model
class Person {
  @deprecated
  @SomeAnnotation()
  final String firstName;

  @SomeAnnotation()
  final String lastName;
  @SomeAnnotation()
  final DateTime? dateOfBirth;

  @SomeAnnotation()
  Person({required this.firstName, required this.lastName, this.dateOfBirth});

  @SomeAnnotation()
  @override
  bool operator ==(Object other) {
    return super == other;
  }

  @SomeAnnotation()
  @override
  int get hashCode => super.hashCode;

  @SomeAnnotation()
  @override
  String toString() {
    return "f";
  }
}

void main() {
  Person p = Person(firstName: "John", lastName: "Doe");
}
0
likes
0
points
623
downloads

Publisher

verified publisherarcane.art

Weekly Downloads

Data Modeling for the local madman

Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

bson, fast_log, json_compress, threshold, toml, toonx, toxic, yaml, yaml_edit

More

Packages that depend on artifact