Skip to content

Make sure that a TabBarView doesn't crash in 0x0 environment#178202

Merged
auto-submit[bot] merged 4 commits into
flutter:masterfrom
ahmedsameha1:handle#6537-TabBarView
Nov 12, 2025
Merged

Make sure that a TabBarView doesn't crash in 0x0 environment#178202
auto-submit[bot] merged 4 commits into
flutter:masterfrom
ahmedsameha1:handle#6537-TabBarView

Conversation

@ahmedsameha1

Copy link
Copy Markdown
Contributor

This is my attempt to handle #6537 for the TabBarView widget.

@github-actions github-actions Bot added framework flutter/packages/flutter repository. See also f: labels. f: material design flutter/packages/flutter/material repository. labels Nov 8, 2025

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Code Review

This pull request adds a regression test to ensure that TabBarView does not crash when it has a zero-sized area. The test correctly simulates the conditions that led to the original crash. My review includes a minor suggestion to improve code consistency within the test suite.

Comment on lines +9352 to +9353
final TabController controller = TabController(length: 2, vsync: tester);
addTearDown(controller.dispose);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

medium

For consistency with other tests in this file and to simplify the code, consider using the createTabController helper function. It handles the creation and disposal of the TabController in a single line.

Suggested change
final TabController controller = TabController(length: 2, vsync: tester);
addTearDown(controller.dispose);
final TabController controller = createTabController(length: 2, vsync: tester);

Comment thread packages/flutter/test/material/tabs_test.dart
@victorsanni victorsanni self-requested a review November 11, 2025 00:20
@victorsanni victorsanni added the autosubmit Merge PR when tree becomes green via auto submit App label Nov 11, 2025
@auto-submit auto-submit Bot added this pull request to the merge queue Nov 11, 2025
@jtmcdole

Copy link
Copy Markdown
Member

Currently has merge conflicts in the merge queue. Please try re-landing in a while.

image

@jtmcdole jtmcdole removed this pull request from the merge queue due to a manual request Nov 11, 2025
@flutter-dashboard flutter-dashboard Bot removed the autosubmit Merge PR when tree becomes green via auto submit App label Nov 11, 2025
@victorsanni victorsanni added the autosubmit Merge PR when tree becomes green via auto submit App label Nov 12, 2025
@auto-submit auto-submit Bot added this pull request to the merge queue Nov 12, 2025
@auto-submit auto-submit Bot removed the autosubmit Merge PR when tree becomes green via auto submit App label Nov 12, 2025
@auto-submit

auto-submit Bot commented Nov 12, 2025

Copy link
Copy Markdown
Contributor

auto label is removed for flutter/flutter/178202, Failed to enqueue flutter/flutter/178202 with HTTP 400: GraphQL mutate failed.

@victorsanni victorsanni removed this pull request from the merge queue due to a manual request Nov 12, 2025
@victorsanni victorsanni added the autosubmit Merge PR when tree becomes green via auto submit App label Nov 12, 2025
@auto-submit auto-submit Bot added this pull request to the merge queue Nov 12, 2025
Merged via the queue into flutter:master with commit 8758971 Nov 12, 2025
78 checks passed
@flutter-dashboard flutter-dashboard Bot removed the autosubmit Merge PR when tree becomes green via auto submit App label Nov 12, 2025
IvoneDjaja pushed a commit to IvoneDjaja/flutter that referenced this pull request Nov 22, 2025
mboetger pushed a commit to mboetger/flutter that referenced this pull request Dec 2, 2025
reidbaker pushed a commit to AbdeMohlbi/flutter that referenced this pull request Dec 10, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants