implement Iterator and Comparable instead of extending them (#123282)

implement Iterator and Comparable instead of extending them
This commit is contained in:
Jacob MacDonald 2023-03-23 10:10:31 -07:00 committed by GitHub
parent 5a36bddd2b
commit b212e7b32b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 3 additions and 3 deletions

View File

@ -200,7 +200,7 @@ class Board extends IterableMixin<BoardPoint?> {
}
}
class _BoardIterator extends Iterator<BoardPoint?> {
class _BoardIterator implements Iterator<BoardPoint?> {
_BoardIterator(this.boardPoints);
final List<BoardPoint> boardPoints;

View File

@ -131,7 +131,7 @@ class TextSelectionPoint {
/// the [VerticalCaretMovementRun] must not be used. The [isValid] property must
/// be checked before calling [movePrevious], [moveNext] and [moveByOffset],
/// or accessing [current].
class VerticalCaretMovementRun extends Iterator<TextPosition> {
class VerticalCaretMovementRun implements Iterator<TextPosition> {
VerticalCaretMovementRun._(
this._editable,
this._lineMetrics,

View File

@ -2875,7 +2875,7 @@ class _BoxEdge implements Comparable<_BoxEdge> {
/// nodes that share the same [SemanticsNode] parent.
///
/// The [nodes] are sorted among each other separately from other nodes.
class _SemanticsSortGroup extends Comparable<_SemanticsSortGroup> {
class _SemanticsSortGroup implements Comparable<_SemanticsSortGroup> {
_SemanticsSortGroup({
required this.startOffset,
required this.textDirection,