Skip to content

Conversation

@Piinks
Copy link
Contributor

@Piinks Piinks commented Mar 20, 2023

Adds a common debug method for checking that a viewport has bounded constraints. Provides a clean and clear error message everywhere that we check for this. There was already an excellent check and error message written for this in computeDryLayout, so I moved it to be shared.

Fixes #78796

I did not make this debug method part of the viewport class because it can be used in the 2D viewport as well later. :)

Pre-launch Checklist

  • I read the Contributor Guide and followed the process outlined there for submitting PRs.
  • I read the Tree Hygiene wiki page, which explains my responsibilities.
  • I read and followed the Flutter Style Guide, including Features we expect every widget to implement.
  • I signed the CLA.
  • I listed at least one issue that this PR fixes in the description above.
  • I updated/added relevant documentation (doc comments with ///).
  • I added new tests to check the change I am making, or this PR is test-exempt.
  • All existing and new tests are passing.

If you need help, consider asking for advice on the #hackers-new channel on Discord.

@Piinks Piinks added framework flutter/packages/flutter repository. See also f: labels. f: scrolling Viewports, list views, slivers, etc. a: error message Error messages from the Flutter framework labels Mar 20, 2023
@Piinks Piinks requested a review from goderbauer March 20, 2023 17:39
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

@Piinks Piinks added the autosubmit Merge PR when tree becomes green via auto submit App label Mar 20, 2023
@auto-submit auto-submit bot removed the autosubmit Merge PR when tree becomes green via auto submit App label Mar 20, 2023
@auto-submit
Copy link
Contributor

auto-submit bot commented Mar 20, 2023

auto label is removed for flutter/flutter, pr: 123035, due to - The status or check suite Mac customer_testing has failed. Please fix the issues identified (or deflake) before re-applying this label.

  • The status or check suite Linux skp_generator has failed. Please fix the issues identified (or deflake) before re-applying this label.

@Piinks Piinks added the autosubmit Merge PR when tree becomes green via auto submit App label Mar 20, 2023
@auto-submit auto-submit bot merged commit 484c226 into flutter:master Mar 20, 2023
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Mar 21, 2023

testWidgets('Shrinkwrapping viewport asserts bounded cross axis', (WidgetTester tester) async {
final List<FlutterErrorDetails> errors = <FlutterErrorDetails>[];
FlutterError.onError = (FlutterErrorDetails error) => errors.add(error);
Copy link
Contributor Author

Choose a reason for hiding this comment

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

engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request May 10, 2023
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request May 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

a: error message Error messages from the Flutter framework autosubmit Merge PR when tree becomes green via auto submit App f: scrolling Viewports, list views, slivers, etc. framework flutter/packages/flutter repository. See also f: labels.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

'package:flutter/src/rendering/viewport.dart': Failed assertion: line 1860 pos 16: 'constraints.hasBoundedHeight': is not true.

2 participants