jefflim-google
jefflim-google
> * a BuildContext is ever assigned to anything other than a local variable, or This sounds correct. > * a BuildContext is ever passed as an argument to any...
Re lint naming: I'm not familiar with with how lints are generally named. Should they be named according to what is permitted, or what is forbidden? `use_build_context_synchronously` ? vs `do_not_store_build_context`
I was thinking that the linter would allow the function call without issue: ``` myMethod(context); ``` But would analyze the function that was called instead: ``` Future myMethod(BuildContext context) async...
Expanding on that, ``` Future myMethod(BuildContext context) async { myMethod1(context); // fine myMethod2(context); // still fine await myMethod3(context); // ok myMethod4(context); // not ok, since it's after an await. }...
Yes, the null case is something we're aware of, and we didn't have any thoughts about 'case null' because I didn't think that was valid in dart? Even testing in...
I'm unclear from the previous comment if that code is expected to compile or not. The comment `Null` is not an instance of the class `MyEnum` comment makes me think...
As an example of 'objects that hold them', if you have: ``` class Country { String countryName; Country(this.countryName); } ``` and then: ``` static final singapore = Country(strings.singapore); ``` Then...
We've been consistently naming these with a 'strings' import, i.e. we always import these as: import 'strings.dart' as strings' And we always invoke them as: strings.xxxx or strings.xxxx(). We'd be...
@doNotStore sounds like an excellent approach to me!
One subtlety: It's fine to store a *function* into a static final or const map: ```dart String message1() => Intl.message( 'Message 1', name: 'message1', desc: 'Default text for message 1...