Skip to content

Commit

Permalink
Remove RenderAligningShiftedBox.mixin (no longer needed) (#105177)
Browse files Browse the repository at this point in the history
  • Loading branch information
TahaTesser authored Jun 6, 2022
1 parent 82ae612 commit d73b657
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 15 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -53,10 +53,10 @@ class _OverflowRegionData {
/// ```dart
/// class MyRenderObject extends RenderAligningShiftedBox with DebugOverflowIndicatorMixin {
/// MyRenderObject({
/// AlignmentGeometry alignment = Alignment.center,
/// TextDirection? textDirection,
/// RenderBox? child,
/// }) : super.mixin(alignment, textDirection, child);
/// super.alignment = Alignment.center,
/// required super.textDirection,
/// super.child,
/// });
///
/// late Rect _containerRect;
/// late Rect _childRect;
Expand Down
15 changes: 4 additions & 11 deletions packages/flutter/lib/src/rendering/shifted_box.dart
Original file line number Diff line number Diff line change
Expand Up @@ -291,12 +291,6 @@ abstract class RenderAligningShiftedBox extends RenderShiftedBox {
_textDirection = textDirection,
super(child);

/// A constructor to be used only when the extending class also has a mixin.
// TODO(gspencer): Remove this constructor once https://github.com/dart-lang/sdk/issues/31543 is fixed.
@protected
RenderAligningShiftedBox.mixin(AlignmentGeometry alignment, TextDirection? textDirection, RenderBox? child)
: this(alignment: alignment, textDirection: textDirection, child: child);

Alignment? _resolvedAlignment;

void _resolve() {
Expand Down Expand Up @@ -707,17 +701,16 @@ class RenderConstraintsTransformBox extends RenderAligningShiftedBox with DebugO
///
/// The [alignment] and [clipBehavior] must not be null.
RenderConstraintsTransformBox({
required AlignmentGeometry alignment,
required TextDirection? textDirection,
required super.alignment,
required super.textDirection,
required BoxConstraintsTransform constraintsTransform,
RenderBox? child,
super.child,
Clip clipBehavior = Clip.none,
}) : assert(alignment != null),
assert(clipBehavior != null),
assert(constraintsTransform != null),
_constraintsTransform = constraintsTransform,
_clipBehavior = clipBehavior,
super.mixin(alignment, textDirection, child);
_clipBehavior = clipBehavior;

/// {@macro flutter.widgets.constraintsTransform}
BoxConstraintsTransform get constraintsTransform => _constraintsTransform;
Expand Down

0 comments on commit d73b657

Please sign in to comment.