Skip to content

📝 Naming Conventions Standards for Flutter

Core Standards

General Naming Rules

  1. Use camelCase for variables, functions, methods, and parameters
  2. Use PascalCase for classes, interfaces, enums, and typedefs
  3. Use snake_case for file names and directory names
  4. Use UPPER_SNAKE_CASE for constants and enum values
  5. Use descriptive names that clearly indicate purpose
  6. Avoid abbreviations unless they are widely understood
  7. Use consistent naming across the entire project
  8. Follow Dart/Flutter conventions for all naming

Common Violations

DO NOT Violate These Rules

  1. Don't use inconsistent casing - Follow camelCase, PascalCase, snake_case rules
  2. Don't use abbreviations - Use full, descriptive names
  3. Don't use unclear names - Use names that clearly indicate purpose
  4. Don't mix naming conventions - Use consistent conventions throughout
  5. Don't use special characters - Avoid special characters in names
  6. Don't use reserved words - Avoid Dart/Flutter reserved words
  7. Don't use hardcoded values - Use named constants instead

ALWAYS Follow These Rules

  1. Use camelCase for variables, functions, methods, and parameters
  2. Use PascalCase for classes, interfaces, enums, and typedefs
  3. Use snake_case for file names and directory names
  4. Use UPPER_SNAKE_CASE for constants and enum values
  5. Use descriptive names that clearly indicate purpose
  6. Use consistent naming across the entire project
  7. Use verb-noun pattern for function names
  8. Use appropriate suffixes for different types (Page, Widget, Service, etc.)
  9. Use consistent import organization by type
  10. Use relative imports for local files