Flutter - Coding Patterns
Documenting tips Programming is sometimes 60% coding and 40% documenting. So it's very useful to know about documenting tips. If you are having trouble coming up with useful documentation, here are some useful tips. Avoid checking in comments that ask questions // BAD: // What should this be? // This is a workaround. // GOOD: // According to this specification, this should be 2.0, but according to that // specification, it should be 3.0. We split the difference and went with // 2.5, because we didn't know what else to do. // TODO(username): Converting color to RGB because class Color doesn't support // hex yet. See http://link/to/a/bug/123 Avoid useless documentation // BAD: /// The background color. final Color backgroundColor; /// Half the diameter of the circle. final doub