artifact 1.0.23 copy "artifact: ^1.0.23" to clipboard
artifact: ^1.0.23 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
class SomeModel {
  final int age;
  final String name;
  final String ssn;
  final String address;

  const SomeModel({
    required this.age,
    required this.name,
    required this.ssn,
    required this.address,
  });
}

@artifact
class ParentThing {
  final List<SomeModel> models;

  const ParentThing({this.models = const []});
}

void main() {
  $artifactCipher = "derp";

  ParentThing m = ParentThing(
    models: [
      SomeModel(
        name: "Daniel",
        address: "115 Kanter Dr",
        age: 29,
        ssn: "123456789",
      ),
      SomeModel(
        name: "Daniel",
        address: "115 Kanter Dr",
        age: 29,
        ssn: "123456789",
      ),
      SomeModel(
        name: "Daniel",
        address: "115 Kanter Dr",
        age: 29,
        ssn: "123456789",
      ),
      SomeModel(
        name: "Daniel",
        address: "115 Kanter Dr",
        age: 29,
        ssn: "123456789",
      ),
      SomeModel(
        name: "Daniel",
        address: "115 Kanter Dr",
        age: 29,
        ssn: "123456789",
      ),
      SomeModel(
        name: "Daniel",
        address: "115 Kanter Dr",
        age: 29,
        ssn: "123456789",
      ),
      SomeModel(
        name: "Daniel",
        address: "115 Kanter Dr",
        age: 29,
        ssn: "123456789",
      ),
      SomeModel(
        name: "Daniel",
        address: "115 Kanter Dr",
        age: 29,
        ssn: "123456789",
      ),
    ],
  );

  print(m.to.toon);
}
0
likes
40
points
615
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, xml, yaml, yaml_edit

More

Packages that depend on artifact