solid-software / solid_lints

🟧 Lints for Dart and Flutter based on software industry standards and best practices.
Other
36 stars 18 forks source link

Narrow down exceptions for avoid_returning_widgets #42

Closed solid-yuriiprykhodko closed 9 months ago

solid-yuriiprykhodko commented 1 year ago

https://github.com/solid-software/solid_lints/blob/release-v0.1.0/lib/lints/avoid_returning_widgets/avoid_returning_widgets_rule.dart#L30

image

We should narrow down the rule to allow Widget build() method only for Widget subclasses.

cc @n-bernat I think we overdid it with the refactoring :)

solid-vovabeloded commented 9 months ago

Closed, but created a follow-up issue to improve the behavior https://github.com/solid-software/solid_lints/issues/68