Skip to content
This repository has been archived by the owner on Mar 6, 2024. It is now read-only.

Remove old typeOf() workarounds #782

Merged
merged 1 commit into from Apr 7, 2022
Merged

Remove old typeOf() workarounds #782

merged 1 commit into from Apr 7, 2022

Conversation

jpnurmi
Copy link
Contributor

@jpnurmi jpnurmi commented Apr 6, 2022

This PR removes the typeOf<T>() and find.byTypeOf() helpers in favor of the
standard find.byType(T). The restriction on passing generic type arguments was
removed in Dart 2.14.

https://medium.com/dartlang/announcing-dart-2-14-b48b9bb2fb67

We’ve also removed an old restriction on type arguments, which
disallowed using generic function types as a type argument. All of
the following were invalid before 2.14, but are now allowed:

Dart 2.14 was shipped with Flutter 2.5. The current stable versions are
2.16 and 2.10, respectively.

The restriction on passing generic type arguments was removed in Dart 2.14.

https://medium.com/dartlang/announcing-dart-2-14-b48b9bb2fb67

> We’ve also removed an old restriction on type arguments, which
> disallowed using generic function types as a type argument. All of
> the following were invalid before 2.14, but are now allowed:

Dart 2.14 was shipped with Flutter 2.5. The current stable versions are
2.16 and 2.10, respectively.
Copy link
Contributor

@CarlosNihelton CarlosNihelton left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@jpnurmi jpnurmi merged commit 8f2cf31 into canonical:main Apr 7, 2022
@jpnurmi jpnurmi deleted the typeof branch April 7, 2022 07:15
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants