Fixes in flutter framework code to address the mixin issue raised
in https://github.com/dart-lang/sdk/issues/31984
This commit is contained in:
parent
17c50693b1
commit
1c236d5245
@ -52,7 +52,7 @@ class RenderProxyBox extends RenderBox with RenderObjectWithChildMixin<RenderBox
|
||||
/// of [RenderProxyBox] is desired but inheriting from [RenderProxyBox] is
|
||||
/// 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> {
|
||||
// This class is intended to be used as a mixin, and should not be
|
||||
// extended directly.
|
||||
factory RenderProxyBoxMixin._() => null;
|
||||
|
@ -299,7 +299,7 @@ class KeepAliveHandle extends ChangeNotifier {
|
||||
///
|
||||
/// * [AutomaticKeepAlive], which listens to messages from this mixin.
|
||||
/// * [KeepAliveNotification], the notifications sent by this mixin.
|
||||
abstract class AutomaticKeepAliveClientMixin extends State<StatefulWidget> {
|
||||
abstract class AutomaticKeepAliveClientMixin<T extends StatefulWidget> extends State<T> {
|
||||
// This class is intended to be used as a mixin, and should not be
|
||||
// extended directly.
|
||||
factory AutomaticKeepAliveClientMixin._() => null;
|
||||
@ -358,4 +358,4 @@ abstract class AutomaticKeepAliveClientMixin extends State<StatefulWidget> {
|
||||
_ensureKeepAlive();
|
||||
return null;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -73,7 +73,7 @@ class TickerMode extends InheritedWidget {
|
||||
/// This mixin only supports vending a single ticker. If you might have multiple
|
||||
/// [AnimationController] objects over the lifetime of the [State], use a full
|
||||
/// [TickerProviderStateMixin] instead.
|
||||
abstract class SingleTickerProviderStateMixin extends State<dynamic> implements TickerProvider { // ignore: TYPE_ARGUMENT_NOT_MATCHING_BOUNDS, https://github.com/dart-lang/sdk/issues/25232
|
||||
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
|
||||
// This class is intended to be used as a mixin, and should not be
|
||||
// extended directly.
|
||||
factory SingleTickerProviderStateMixin._() => null;
|
||||
@ -155,7 +155,7 @@ abstract class SingleTickerProviderStateMixin extends State<dynamic> implements
|
||||
/// If you only have a single [Ticker] (for example only a single
|
||||
/// [AnimationController]) for the lifetime of your [State], then using a
|
||||
/// [SingleTickerProviderStateMixin] is more efficient. This is the common case.
|
||||
abstract class TickerProviderStateMixin extends State<dynamic> implements TickerProvider { // ignore: TYPE_ARGUMENT_NOT_MATCHING_BOUNDS, https://github.com/dart-lang/sdk/issues/25232
|
||||
abstract class TickerProviderStateMixin<T extends StatefulWidget> extends State<T> implements TickerProvider { // ignore: TYPE_ARGUMENT_NOT_MATCHING_BOUNDS, https://github.com/dart-lang/sdk/issues/25232
|
||||
// This class is intended to be used as a mixin, and should not be
|
||||
// extended directly.
|
||||
factory TickerProviderStateMixin._() => null;
|
||||
@ -231,7 +231,7 @@ abstract class TickerProviderStateMixin extends State<dynamic> implements Ticker
|
||||
class _WidgetTicker extends Ticker {
|
||||
_WidgetTicker(TickerCallback onTick, this._creator, { String debugLabel }) : super(onTick, debugLabel: debugLabel);
|
||||
|
||||
final TickerProviderStateMixin _creator;
|
||||
final TickerProviderStateMixin<StatefulWidget> _creator;
|
||||
|
||||
@override
|
||||
void dispose() {
|
||||
|
Loading…
x
Reference in New Issue
Block a user