view_model_annotation library

Annotations used by view_model code generator.

Import this package to mark your classes with @GenProvider or use the shorthand constant @genProvider.

Classes

Expr
Expression
Marker type to carry a code expression string in annotations. The generator will unwrap Expr(code) and emit code as an expression inside builder closures, instead of a string literal.
GenProvider
Annotation to mark a ViewModel for provider code generation. Each annotated class will receive a generated ViewModelProvider variable in a .vm.dart part file.

Constants

genProvider → const GenProvider
Shorthand constant for GenProvider.