Unverified Commit d637b187 authored by Michael Goderbauer's avatar Michael Goderbauer Committed by GitHub

non-breaking changes for prefer_mixin lint (#77837)

parent fa06b340
...@@ -11,7 +11,7 @@ import 'package:vector_math/vector_math_64.dart' show Vector3; ...@@ -11,7 +11,7 @@ import 'package:vector_math/vector_math_64.dart' show Vector3;
// The entire state of the hex board and abstraction to get information about // The entire state of the hex board and abstraction to get information about
// it. Iterable so that all BoardPoints on the board can be iterated over. // it. Iterable so that all BoardPoints on the board can be iterated over.
@immutable @immutable
class Board extends Object with IterableMixin<BoardPoint?> { class Board extends IterableMixin<BoardPoint?> {
Board({ Board({
required this.boardRadius, required this.boardRadius,
required this.hexagonRadius, required this.hexagonRadius,
......
...@@ -1427,7 +1427,7 @@ abstract class RangeSliderTrackShape { ...@@ -1427,7 +1427,7 @@ abstract class RangeSliderTrackShape {
/// rectangular edges /// rectangular edges
/// * [RoundedRectSliderTrackShape], which is a track shape with round /// * [RoundedRectSliderTrackShape], which is a track shape with round
/// stadium-like edges. /// stadium-like edges.
abstract class BaseSliderTrackShape { mixin BaseSliderTrackShape {
/// Returns a rect that represents the track bounds that fits within the /// Returns a rect that represents the track bounds that fits within the
/// [Slider]. /// [Slider].
/// ///
......
...@@ -1596,8 +1596,7 @@ abstract class RenderSliver extends RenderObject { ...@@ -1596,8 +1596,7 @@ abstract class RenderSliver extends RenderObject {
} }
/// Mixin for [RenderSliver] subclasses that provides some utility functions. /// Mixin for [RenderSliver] subclasses that provides some utility functions.
abstract class RenderSliverHelpers implements RenderSliver { mixin RenderSliverHelpers implements RenderSliver {
bool _getRightWayUp(SliverConstraints constraints) { bool _getRightWayUp(SliverConstraints constraints) {
assert(constraints != null); assert(constraints != null);
assert(constraints.axisDirection != null); assert(constraints.axisDirection != null);
......
...@@ -167,7 +167,7 @@ abstract class KeyHelper { ...@@ -167,7 +167,7 @@ abstract class KeyHelper {
} }
/// Helper class that uses GLFW-specific key mappings. /// Helper class that uses GLFW-specific key mappings.
class GLFWKeyHelper with KeyHelper { class GLFWKeyHelper implements KeyHelper {
/// This mask is used to check the [RawKeyEventDataLinux.modifiers] field to /// This mask is used to check the [RawKeyEventDataLinux.modifiers] field to
/// test whether the CAPS LOCK modifier key is on. /// test whether the CAPS LOCK modifier key is on.
/// ///
...@@ -304,7 +304,7 @@ class GLFWKeyHelper with KeyHelper { ...@@ -304,7 +304,7 @@ class GLFWKeyHelper with KeyHelper {
} }
/// Helper class that uses GTK-specific key mappings. /// Helper class that uses GTK-specific key mappings.
class GtkKeyHelper with KeyHelper { class GtkKeyHelper implements KeyHelper {
/// This mask is used to check the [RawKeyEventDataLinux.modifiers] field to /// This mask is used to check the [RawKeyEventDataLinux.modifiers] field to
/// test whether one of the SHIFT modifier keys is pressed. /// test whether one of the SHIFT modifier keys is pressed.
/// ///
......
...@@ -791,9 +791,9 @@ enum SelectionChangedCause { ...@@ -791,9 +791,9 @@ enum SelectionChangedCause {
drag, drag,
} }
/// An interface for manipulating the selection, to be used by the implementer /// A mixin for manipulating the selection, to be used by the implementer
/// of the toolbar widget. /// of the toolbar widget.
abstract class TextSelectionDelegate { mixin TextSelectionDelegate {
/// Gets the current text input. /// Gets the current text input.
TextEditingValue get textEditingValue; TextEditingValue get textEditingValue;
......
...@@ -31,7 +31,7 @@ import 'package:flutter/rendering.dart'; ...@@ -31,7 +31,7 @@ import 'package:flutter/rendering.dart';
/// ///
/// * [FixedScrollMetrics], which is an immutable object that implements this /// * [FixedScrollMetrics], which is an immutable object that implements this
/// interface. /// interface.
abstract class ScrollMetrics { mixin ScrollMetrics {
/// Creates a [ScrollMetrics] that has the same properties as this object. /// Creates a [ScrollMetrics] that has the same properties as this object.
/// ///
/// This is useful if this object is mutable, but you want to get a snapshot /// This is useful if this object is mutable, but you want to get a snapshot
...@@ -129,7 +129,7 @@ abstract class ScrollMetrics { ...@@ -129,7 +129,7 @@ abstract class ScrollMetrics {
/// An immutable snapshot of values associated with a [Scrollable] viewport. /// An immutable snapshot of values associated with a [Scrollable] viewport.
/// ///
/// For details, see [ScrollMetrics], which defines this object's interfaces. /// For details, see [ScrollMetrics], which defines this object's interfaces.
class FixedScrollMetrics extends ScrollMetrics { class FixedScrollMetrics with ScrollMetrics {
/// Creates an immutable snapshot of values associated with a [Scrollable] viewport. /// Creates an immutable snapshot of values associated with a [Scrollable] viewport.
FixedScrollMetrics({ FixedScrollMetrics({
required double? minScrollExtent, required double? minScrollExtent,
......
...@@ -54,7 +54,7 @@ class _GestureBindingSpy extends AutomatedTestWidgetsFlutterBinding { ...@@ -54,7 +54,7 @@ class _GestureBindingSpy extends AutomatedTestWidgetsFlutterBinding {
PointerRouter get pointerRouter => _testPointerRouter; PointerRouter get pointerRouter => _testPointerRouter;
} }
class FakeEditableTextState extends TextSelectionDelegate with Fake { } class FakeEditableTextState extends Fake implements TextSelectionDelegate { }
class _PointerRouterSpy extends PointerRouter { class _PointerRouterSpy extends PointerRouter {
int routeCount = 0; int routeCount = 0;
......
...@@ -598,7 +598,7 @@ class AlwaysKeepAliveRenderBoxState extends State<_AlwaysKeepAlive> with Automat ...@@ -598,7 +598,7 @@ class AlwaysKeepAliveRenderBoxState extends State<_AlwaysKeepAlive> with Automat
} }
} }
abstract class KeepAliveParentDataMixinAlt implements KeepAliveParentDataMixin { mixin KeepAliveParentDataMixinAlt implements KeepAliveParentDataMixin {
@override @override
bool keptAlive = false; bool keptAlive = false;
......
...@@ -128,9 +128,9 @@ class LocalFileComparator extends GoldenFileComparator with LocalComparisonOutpu ...@@ -128,9 +128,9 @@ class LocalFileComparator extends GoldenFileComparator with LocalComparisonOutpu
File _getGoldenFile(Uri golden) => File(_path.join(_path.fromUri(basedir), _path.fromUri(golden.path))); File _getGoldenFile(Uri golden) => File(_path.join(_path.fromUri(basedir), _path.fromUri(golden.path)));
} }
/// A class for use in golden file comparators that run locally and provide /// A mixin for use in golden file comparators that run locally and provide
/// output. /// output.
class LocalComparisonOutput { mixin LocalComparisonOutput {
/// Writes out diffs from the [ComparisonResult] of a golden file test. /// Writes out diffs from the [ComparisonResult] of a golden file test.
/// ///
/// Will throw an error if a null result is provided. /// Will throw an error if a null result is provided.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment