webdriver.dart icon indicating copy to clipboard operation
webdriver.dart copied to clipboard

[Breaking] Replace usages of `dart:math` geometry types with custom types

Open parlough opened this issue 1 year ago • 2 comments

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

parlough avatar Feb 14 '25 01:02 parlough

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

devoncarew avatar Feb 25 '25 19:02 devoncarew

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 :)

parlough avatar Feb 25 '25 20:02 parlough