Skip to content
This repository was archived by the owner on Nov 20, 2024. It is now read-only.

avoid_unnecessary_containers #1776

Merged
merged 6 commits into from
Oct 18, 2019
Merged

avoid_unnecessary_containers #1776

merged 6 commits into from
Oct 18, 2019

Conversation

pq
Copy link
Contributor

@pq pq commented Oct 18, 2019

bool isWidgetType(DartType type) =>
DartTypeUtilities.implementsInterface(type, 'Widget', '');
bool isContainerType(DartType type) =>
DartTypeUtilities.implementsInterface(type, 'Container', '');
Copy link
Contributor

Choose a reason for hiding this comment

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

Is this the semantic you want - not just exactly Container, but also its subclasses?
Why not isInterface?

Copy link
Contributor

Choose a reason for hiding this comment

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

See for example isExactWidgetTypeContainer is DAS.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

hmm, yes. i think you're right. thanks.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ok, fixed. PTAL?

@pq pq mentioned this pull request Oct 18, 2019
pq added 3 commits October 18, 2019 14:26
# Conflicts:
#	lib/src/util/flutter_utils.dart
#	test/mock_packages/flutter/lib/widgets.dart
@pq pq merged commit ef2c691 into master Oct 18, 2019
@pq pq deleted the avoid_unnecessary_containers branch October 18, 2019 21:54
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Development

Successfully merging this pull request may close these issues.

3 participants