for easy implements domain primitive

on Dart Primitive Types (int, double, String...)

Features

  • You can define more TypeSafe Primitive Type.

Getting started

TODO: List prerequisites and provide or point to information on how to start using the package.

Usage

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);
}

Additional information

this is hobby library.

Dart Static Metaprogramming or value-class maybe introduce me more cool solution.