Skip to content

Commit e8c9e31

Browse files
Apply suggestions from code review
Co-authored-by: pinkeshmars <[email protected]>
1 parent 71645f6 commit e8c9e31

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

docs/resources/style-guide.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
---
22
slug: /resources/style-guide
3-
title: How to name variables?
3+
title: Naming Variables
44
description: Naming conventions for FlutterFlow, including guidelines for widgets, components, state variables, constants, and more.
55
tags: [Style Guide, Variables]
66
keywords: [Style Guide, Variables]
77
---
88

99
# Naming Variables
1010

11-
Follow a consistent naming convention for variables, functions, and components to make your code more readable and maintainable.
11+
To make your code more maintainable, readable, and consistent, it’s essential to adopt clear naming conventions for variables, functions, and components.
1212

13-
Best practices for naming conventions in app development, especially for projects using Flutter, aim to improve code readability, maintainability, and consistency across the application. Here are some general guidelines tailored for different aspects of a Flutter project:
13+
Best practices for naming conventions in app development (especially for projects using Flutter), aim to improve code readability, maintainability, and consistency across the application. Here are some general guidelines tailored for different aspects of a Flutter project:
1414

1515
Various naming styles (as suggested by [Dart Effective Style Guide](https://dart.dev/effective-dart/style#identifiers)):
1616

@@ -30,7 +30,7 @@ Various naming styles (as suggested by [Dart Effective Style Guide](https://dart
3030

3131

3232
### Pages & Components
33-
Use **UpperCamelCase** for all widget, component, page, and screen names to maintain consistency and readability. FlutterFlow ensures clarity by automatically adding "Widget" to widget names when generating code. For components, you can suffix the name with "Component" to clearly distinguish them.
33+
Use **UpperCamelCase** for all widgets, components, pages, and screen names to maintain consistency and readability. FlutterFlow ensures clarity by automatically adding "Widget" to widget names when generating code. For components, you can suffix the name with "Component" to clearly distinguish them.
3434

3535
Similarly, for pages and screens, include "Page" or "Screen" in the name to indicate their purpose. This approach aligns with Dart conventions for class names and ensures a well-organized project structure.
3636

@@ -65,7 +65,7 @@ When naming custom data types and enums, use UpperCamelCase for consistency and
6565

6666
- **Use UpperCamelCase for Custom Data Types:** Name your custom data types using **UpperCamelCase**. Ensure that names are clear, concise, and descriptive, reflecting the entity they represent. Good Examples: `UserModel`, `ProductDetails`, `OrderItem`.
6767

68-
- **Use consistent naming for Enum Names and Values:** Use **UpperCamelCase** for the enum name such as `Status`, `ConnectionState`, `UserRole` and **lowerCamelCase** for its values for e.g `{active, inactive, pending}`. This approach aligns with Dart's enum naming guidelines and ensures consistency.
68+
- **Use consistent naming for Enum Names and Values:** Use **UpperCamelCase** for the enum name such as, `Status`, `ConnectionState`, `UserRole` and **lowerCamelCase** for its values e.g., `{active, inactive, pending}`. This approach aligns with Dart's enum naming guidelines and ensures consistency.
6969

7070
- **Use Plural Names for Lists:** If the data type represents a List, use a plural name to clarify its purpose. Good Example: `OrderItems` (to represent multiple `OrderItem` objects).
7171
:::

0 commit comments

Comments
 (0)