for easy implements domain primitive
on Dart Primitive Types (int, double, String...)
- You can define more TypeSafe Primitive Type.
TODO: List prerequisites and provide or point to information on how to start using the package.
TODO: Include short and useful examples for package users. Add longer examples
to /example
folder.
class Price extends TaggedPositiveInt with TaggedPositiveIntSubtraction {
Price(super.value);
@override
Price newInstance(int n) => Price(n);
}
main() {
final price300 = Price(100) + Price(200);
}
this is hobby library.
Dart Static Metaprogramming or value-class maybe introduce me more cool solution.