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

Data Modeling for the local madman

example/lib/example.dart

import 'package:artifact/artifact.dart';
import 'package:example/gen/artifacts.gen.dart';

@Artifact(compression: false, reflection: true)
class Person {
  final String firstName;
  final String lastName;
  final DateTime? dateOfBirth;

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

void main() {
  Person p = Person(firstName: "John", lastName: "Doe");

  for (var f in $Person.$fields) {
    print("${f.name} ${f.fieldType}");
    print(f.getValue(p));
  }
}
0
likes
40
points
502
downloads

Publisher

verified publisherarcane.art

Weekly Downloads

Data Modeling for the local madman

Repository (GitHub)
View/report issues

License

GPL-3.0 (license)

Dependencies

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

More

Packages that depend on artifact