forked from flutter/flutter
-
Notifications
You must be signed in to change notification settings - Fork 0
Developer best practices
qchong edited this page Jul 28, 2016
·
1 revision
When writing your Flutter app, you should follow the tips described in Effective Dart, except where noted below.
##Style
###Formatting
- Order class members by typical lifecycle.
- Prefer grouping methods and fields by function, not by type.
- Prefer line length of 80 characters.
- Indent multi-line argument and parameter lists by 2 characters.
- Prefer single quotes for strings.
- Consider using “=>” for short functions and methods.
- Use braces for long functions and methods.
- Use => for inline callbacks that just return list or map literals.
- Separate the “if” expression from its statement.
- Avoid using braces for one-line long control structure statements.
##Documentation
###Comments
###Doc comments (dartdocs)
- Avoid useless documentation.
- Leave breadcrumbs in the comments.
- Refactor the code when the documentation would be incomprehensible.
##Usage
##Design
###Naming
