flyme_annotation 0.1.1 flyme_annotation: ^0.1.1 copied to clipboard
Annotation for flyme_generator.
flyme_annotation #
Just for Flutter.
Annotation for flame_generator.
Getting Started #
Properties #
Properties: a property list.
Property #
Property: describe instance's property. And it has three properties:
- name: property's name.
- type: property's type.
- initial: property's initialized value.
How to use #
just see the code:
@Properties([
Property(name: "name", type: "String", initial: ""),
Property(name: "age", type: "num", initial: "-1"),
Property(
name: "user",
type: "User",
initial: '''User(name: "", age: -1, email: "")'''),
Property(name: "foo", type: "String"),
Property(name: "boo", type: "String", initial: "something"),
])
class TestModel extends _ViewModelProxy {
@override
void init() {
print("==== Test init ====");
}
}