Skip to content

Add Overflow back with deprecation#66305

Merged
fluttergithubbot merged 4 commits intoflutter:masterfrom
liyuqian:overflow
Sep 23, 2020
Merged

Add Overflow back with deprecation#66305
fluttergithubbot merged 4 commits intoflutter:masterfrom
liyuqian:overflow

Conversation

@liyuqian
Copy link
Contributor

@liyuqian liyuqian commented Sep 22, 2020

As the overflow option in the Stack is so popular, let's put it in deprecation for a while before completely removing it.

Fixes #66030

@liyuqian liyuqian requested a review from goderbauer September 22, 2020 00:41
@flutter-dashboard flutter-dashboard bot added the framework flutter/packages/flutter repository. See also f: labels. label Sep 22, 2020
this.alignment = AlignmentDirectional.topStart,
this.textDirection,
this.fit = StackFit.loose,
this.overflow = Overflow.clip,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe you also want to add the deprecation notice to this param here.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

/// hit testing.
///
/// This overrides [clipBehavior] for now due to a staged roll out without
/// breaking Google. We will remove it and only use [clipBehavior] soon.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's not mention google here.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

textDirection: TextDirection.ltr,
child: Center(
child: Stack(
overflow: Overflow.visible,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why this?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was trying to revert the change in #61366. I can certainly remove this line but this line could test that overflow won't cause any compile error yet. Would you like me to remove this line?

/// ([StackFit.expand]).
final StackFit fit;

@Deprecated(
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should go after the doc comment.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

/// Whether overflowing children should be clipped, or their overflow be
/// visible.
///
/// Deprecated. Use clipBehavior instead.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
/// Deprecated. Use clipBehavior instead.
/// Deprecated. Use [Stack.clipBehavior] instead.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

Copy link
Member

@goderbauer goderbauer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

passthrough,
}

@Deprecated(
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this deprecation should also go below the doc comment.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

Comment on lines +3337 to +3338
'Use clipBehavior instead. See the migration guide in '
'flutter.dev/go/clip-behavior. This feature was deprecated after v1.22.'
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: formatting.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

framework flutter/packages/flutter repository. See also f: labels.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[documentation] Overflow parameter removed from Stack Widget

4 participants