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

Data Modeling for the local madman

example/lib/example.dart

import 'dart:convert';

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

@artifact
class AllFields {
  final int finalX;
  final int finalDefX;
  final int? nullX;
  final int? defX;

  const AllFields({
    required this.finalX,
    this.nullX,
    this.defX = 4,
    this.finalDefX = 99,
  });
}

void main() {
  print(jsonEncode(jsonDecode(AllFields(finalX: 19).toJson())));

  AllFields f = AllFields(finalX: 10);
}
0
likes
130
points
10
downloads

Publisher

verified publisherarcane.art

Weekly Downloads

Data Modeling for the local madman

Repository (GitHub)

License

GPL-3.0 (license)

Dependencies

analyzer, build, fast_log, glob, source_gen, toxic

More

Packages that depend on artifact