-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Closed
Labels
devexp-linterIssues with the analyzer's support for the linter packageIssues with the analyzer's support for the linter packagelegacy-area-analyzerUse area-devexp instead.Use area-devexp instead.linter-lint-proposallinter-status-pending
Description
sort_public_methods_before_private_methods
Description
Define public methods before private methods.
Details
DO define public methods before private methods.
This makes the code uniform across multiple classes and it makes it faster to find specific methods in a class.
Because public methods are the interface to the class they are (often) more important and should come before private methods.
This would be my first approach to have a defined order for different parts in a class.
Flutter style guide ordering of class members
Kind
Style
Good Examples
class A {
int a() => 0;
int c() => 0;
int _b() => 0;
}Bad Examples
class A {
int a() => 0;
int _b() => 0;
int c() => 0;
}Metadata
Metadata
Assignees
Labels
devexp-linterIssues with the analyzer's support for the linter packageIssues with the analyzer's support for the linter packagelegacy-area-analyzerUse area-devexp instead.Use area-devexp instead.linter-lint-proposallinter-status-pending