Add meta tag @optionalTypeArgs to the mixin classes where we don't expect a generic type to be specified at the points where the mixin is applied. This suppresses the analyzer warnings.
This commit is contained in:
parent
1c236d5245
commit
337ad9dc9e
@ -51,7 +51,8 @@ class RenderProxyBox extends RenderBox with RenderObjectWithChildMixin<RenderBox
|
|||||||
/// This class can be used as a mixin for situations where the proxying behavior
|
/// This class can be used as a mixin for situations where the proxying behavior
|
||||||
/// of [RenderProxyBox] is desired but inheriting from [RenderProxyBox] is
|
/// of [RenderProxyBox] is desired but inheriting from [RenderProxyBox] is
|
||||||
/// impractical (e.g. because you want to mix in other classes as well).
|
/// 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
|
/// TODO(ianh): Remove this class once https://github.com/dart-lang/sdk/issues/15101 is fixed
|
||||||
|
@optionalTypeArgs
|
||||||
abstract class RenderProxyBoxMixin<T extends RenderBox> extends RenderBox with RenderObjectWithChildMixin<T> {
|
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
|
// This class is intended to be used as a mixin, and should not be
|
||||||
// extended directly.
|
// extended directly.
|
||||||
|
@ -299,6 +299,7 @@ class KeepAliveHandle extends ChangeNotifier {
|
|||||||
///
|
///
|
||||||
/// * [AutomaticKeepAlive], which listens to messages from this mixin.
|
/// * [AutomaticKeepAlive], which listens to messages from this mixin.
|
||||||
/// * [KeepAliveNotification], the notifications sent by this mixin.
|
/// * [KeepAliveNotification], the notifications sent by this mixin.
|
||||||
|
@optionalTypeArgs
|
||||||
abstract class AutomaticKeepAliveClientMixin<T extends StatefulWidget> extends State<T> {
|
abstract class AutomaticKeepAliveClientMixin<T extends StatefulWidget> extends State<T> {
|
||||||
// This class is intended to be used as a mixin, and should not be
|
// This class is intended to be used as a mixin, and should not be
|
||||||
// extended directly.
|
// extended directly.
|
||||||
|
@ -73,6 +73,7 @@ class TickerMode extends InheritedWidget {
|
|||||||
/// This mixin only supports vending a single ticker. If you might have multiple
|
/// This mixin only supports vending a single ticker. If you might have multiple
|
||||||
/// [AnimationController] objects over the lifetime of the [State], use a full
|
/// [AnimationController] objects over the lifetime of the [State], use a full
|
||||||
/// [TickerProviderStateMixin] instead.
|
/// [TickerProviderStateMixin] instead.
|
||||||
|
@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
|
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
|
// This class is intended to be used as a mixin, and should not be
|
||||||
// extended directly.
|
// extended directly.
|
||||||
@ -155,6 +156,7 @@ abstract class SingleTickerProviderStateMixin<T extends StatefulWidget> extends
|
|||||||
/// If you only have a single [Ticker] (for example only a single
|
/// If you only have a single [Ticker] (for example only a single
|
||||||
/// [AnimationController]) for the lifetime of your [State], then using a
|
/// [AnimationController]) for the lifetime of your [State], then using a
|
||||||
/// [SingleTickerProviderStateMixin] is more efficient. This is the common case.
|
/// [SingleTickerProviderStateMixin] is more efficient. This is the common case.
|
||||||
|
@optionalTypeArgs
|
||||||
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
|
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
|
// This class is intended to be used as a mixin, and should not be
|
||||||
// extended directly.
|
// extended directly.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user