Skip to content

Support for replacing the TabController, after disposing the old one - #32434

Merged
HansMuller merged 1 commit into
flutter:masterfrom
HansMuller:tab_length_change
May 10, 2019
Merged

HansMuller merged 1 commit into
flutter:masterfrom
HansMuller:tab_length_change

Conversation

@HansMuller

Copy link
Copy Markdown
Contributor

Fixes #32428

@xster xster added p: material_ui material_ui package in flutter/packages framework flutter/packages/flutter repository. See also f: labels. labels May 9, 2019

@johnsonmh johnsonmh 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.

LGTM

/// of this property is [kAlwaysCompleteAnimation].
Animation<double> get animation => _animationController?.view ?? kAlwaysCompleteAnimation;
final AnimationController _animationController;
/// If the TabController was disposed then return null.

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.

Suggested change
/// If the TabController was disposed then return null.
/// If the [TabController] was disposed then return null.

expect(controller.length, 3);
expect(find.text('Tab0'), findsOneWidget);
expect(find.text('Tab1'), findsOneWidget);
expect(find.text('Tab2'), findsOneWidget);

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.

should you also add an:

expect(find.text('Tab3'), findsOneWidget);

Now that there should be an additional tab?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I'm changing the length from 2 - 3

@HansMuller HansMuller mentioned this pull request May 10, 2019
8 of 9 tasks
@HansMuller
HansMuller merged commit 6d0e235 into flutter:master May 10, 2019
@HansMuller
HansMuller deleted the tab_length_change branch May 10, 2019 05:02
@github-actions github-actions Bot locked as resolved and limited conversation to collaborators Aug 6, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

framework flutter/packages/flutter repository. See also f: labels. p: material_ui material_ui package in flutter/packages

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Replacing the TabController, disposing the old one, fails

4 participants