Skip to content

Conversation

@a-siva
Copy link
Contributor

@a-siva a-siva commented Jan 31, 2018

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.

@a-siva
Copy link
Contributor Author

a-siva commented Jan 31, 2018

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> {
Copy link
Contributor

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;
Copy link
Contributor

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?

@Hixie
Copy link
Contributor

Hixie commented Feb 1, 2018

LGTM

@a-siva a-siva merged commit 5c2323f into flutter:master Feb 1, 2018
@a-siva a-siva deleted the fix-generic branch February 1, 2018 05:09
/// [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
Copy link
Member

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
Copy link
Contributor

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.

a-siva added a commit to a-siva/flutter that referenced this pull request Feb 15, 2018
up the latest Dart roll

- Resubmit flutter#14392 to fix
compilation errors
@a-siva a-siva mentioned this pull request Feb 15, 2018
a-siva added a commit that referenced this pull request Feb 15, 2018
up the latest Dart roll

- Resubmit #14392 to fix
compilation errors
DaveShuckerow pushed a commit to DaveShuckerow/flutter that referenced this pull request May 14, 2018
up the latest Dart roll

- Resubmit flutter#14392 to fix
compilation errors
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 11, 2021
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.

5 participants