dart-lang / sdk

The Dart SDK, including the VM, JS and Wasm compilers, analysis, core libraries, and more.
https://dart.dev
BSD 3-Clause "New" or "Revised" License
10.28k stars 1.58k forks source link

[linter proposal] member function can be static #59571

Open stephane-archer opened 1 day ago

stephane-archer commented 1 day ago
class foo {
    String hello = "Hello World";
    ....
    void _bar(string s) {
        print(s)
    }
}

_bar does not use any member function so it can be static so it can be used by static and non-static function