[Breaking] Replace usages of `dart:math` geometry types with custom types
This is a breaking change and shouldn't be included until the next major release.
These types were built for dart:html, contain unrelated functionality, and require this library to always add an int generic. To aid the deprecation of these types in dart:math, migrate this package to custom types. These types, particularly the addition of a new Size type can more semantically match their purpose in the package, and be a bit simpler to use, no longer having a type parameter.
Contributes to https://github.com/dart-lang/sdk/issues/54852
I don't know that I have enough context on the 'why' to evaluate this PR. Perhaps we should resolve https://github.com/dart-lang/sdk/issues/54852 first? cc @kevmoo for thoughts
I don't know that I have enough context on the 'why' to evaluate this PR. Perhaps we should resolve https://github.com/dart-lang/sdk/issues/54852 first?
That issue is the why for this. This package seems to be the only dependency of Flutter that uses these types, being a blocking stop in deprecating the types.
Also, Rectangle was used for representing Size causing not matching the semantic meaning and requiring redundant information each time.
Happy to continue the discussion in that issue first though :)