Naming conventions
UpperCamelCase: For Classes, Enumerations, and Typedefs.
Good | Bad |
---|
| |
enum IntegrationEnv {
dev,
pro,
}
| enum integration_env {
dev,
pro,
}
|
typedef NaviAction = void Function();
| typedef naviaction = void Function();
|
snake_case: Libraries, packages, directories, and file names.
Good | Bad |
---|
library appflowy_calendar;
| library AppFlowy_Calendar;
|
import 'package:protobuf/protobuf.dart';
| import 'package:protobuf/Protobuf.Dart';
|
appflowy_calendar_block.dart
| AppflowyCalendar_block.dart |
lowerCamelCase: Variables, constants, and parameters.
Good | Bad |
---|
| |
| const test_value = 14.28;
|
final urlScheme = RegExp(‘^([a-z]+):’);
| final Url_Scheme = RegExp(‘^([a-z]+):’);
|
void sum(int testValue) { ... }
| void sum_of(int test_value) { ... }
|
Last updated