value_object 0.1.0 copy "value_object: ^0.1.0" to clipboard
value_object: ^0.1.0 copied to clipboard

Dart 1 only

A source_gen generator for making value objects

example/value_object.dart

// Copyright (c) 2015, <your name>. All rights reserved. Use of this source code
// is governed by a BSD-style license that can be found in the LICENSE file.

library value_object.example;

import 'package:value_object/value_object.dart';
part 'value_object.g.dart';

@ValueObject(const {"name": "String", "marks": "List<int>"})
class Student extends _$StudentValueObject {
  Student({String name, List<int> marks}) : super(name: name, marks: marks);
}

main() {
  var student = new Student(name: "Peter", marks: [1,2,3]);
  print(student);
}
0
likes
30
pub points
0%
popularity

Publisher

unverified uploader

A source_gen generator for making value objects

Repository (GitHub)
View/report issues

License

BSD-3-Clause (LICENSE)

Dependencies

source_gen

More

Packages that depend on value_object