artifact 1.0.27 copy "artifact: ^1.0.27" to clipboard
artifact: ^1.0.27 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 {
  @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
115
points
564
downloads

Publisher

verified publisherarcane.art

Weekly Downloads

Data Modeling for the local madman

Repository (GitHub)
View/report issues

Documentation

API reference

License

GPL-3.0 (license)

Dependencies

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

More

Packages that depend on artifact