-
Notifications
You must be signed in to change notification settings - Fork 29.8k
Fixes in flutter framework code to address the mixin issue raised in Dart issue 31984 #14392
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
This PR cannot land until we have a fix for dart issue dart-lang/sdk#32019 |
| /// impractical (e.g. because you want to mix in other classes as well). | ||
| // TODO(ianh): Remove this class once https://github.com/dart-lang/sdk/issues/15101 is fixed | ||
| abstract class RenderProxyBoxMixin extends RenderBox with RenderObjectWithChildMixin<RenderBox> { | ||
| abstract class RenderProxyBoxMixin<T extends RenderBox> extends RenderBox with RenderObjectWithChildMixin<T> { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here and elsewhere, I think you need to mark these with @optionalTypeArgs to allow them to be used without a type parameter.
…pect a generic type to be specified at the points where the mixin is applied. This suppresses the analyzer warnings.
| _WidgetTicker(TickerCallback onTick, this._creator, { String debugLabel }) : super(onTick, debugLabel: debugLabel); | ||
|
|
||
| final TickerProviderStateMixin _creator; | ||
| final TickerProviderStateMixin<StatefulWidget> _creator; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this shouldn't be necessary any more right?
| /// [TickerProviderStateMixin] instead. | ||
| abstract class SingleTickerProviderStateMixin extends State<dynamic> implements TickerProvider { // ignore: TYPE_ARGUMENT_NOT_MATCHING_BOUNDS, https://github.com/dart-lang/sdk/issues/25232 | ||
| @optionalTypeArgs | ||
| abstract class SingleTickerProviderStateMixin<T extends StatefulWidget> extends State<T> implements TickerProvider { // ignore: TYPE_ARGUMENT_NOT_MATCHING_BOUNDS, https://github.com/dart-lang/sdk/issues/25232 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think you could remove // ignore: here and below.
| /// impractical (e.g. because you want to mix in other classes as well). | ||
| // TODO(ianh): Remove this class once https://github.com/dart-lang/sdk/issues/15101 is fixed | ||
| abstract class RenderProxyBoxMixin extends RenderBox with RenderObjectWithChildMixin<RenderBox> { | ||
| /// TODO(ianh): Remove this class once https://github.com/dart-lang/sdk/issues/15101 is fixed |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should be two slashes, not three.
up the latest Dart roll - Resubmit flutter#14392 to fix compilation errors
up the latest Dart roll - Resubmit #14392 to fix compilation errors
up the latest Dart roll - Resubmit flutter#14392 to fix compilation errors
Addresses the flutter framework part of the issue raised in dart-lang/sdk#31984.
This pulls all the relevant changes from #14327 without the generic type changes at the mixin application sites.