Buma UI - DocumentationBuma UI - Documentation
Get Started
Foundations
Components
Resources
Patterns
Data Visualization
Back to BSpace
Get Started
Foundations
Components
Resources
Patterns
Data Visualization
  • stacksFoundations
    • 💡 Overview
    • Color
    • Principle
    • Typography
  • brickComponents
    • 💡 Overview
    • Accordion
    • Alert
    • Avatar
    • Badge
    • Bottom Sheet
    • Bread Crumb
    • Button
    • Button Link
    • Button Navigation
    • Calendar
    • Card
    • Chat
    • Checkbox
    • Chips
    • Choice Tile
    • Comment
    • Date Picker
    • Divider
    • Download
    • Drawer
    • Dropdown
    • Empty State
    • Floating Button
    • Form Input
    • Header
    • Hint
    • Icon
    • List Choice
    • Loading
    • Modal
    • Navigation Bar
    • Notification
    • Pagination
    • Progress Bar
    • Radio Button
    • Search
    • Scrolling Bar
    • Segmented Switch
    • Side Menu
    • Side Tab
    • Slider
    • Switch
    • Tab
    • Table
    • Text Area
    • Text Input
    • Time Picker
    • Title
    • Toast
    • Tooltip
    • Wizzard
  • splitscreenPattern
    • 💡 Overview
    • Filter
      upcoming
    • Form
      upcoming
    • Notification
    • PWA
      upcoming
    • table
      upcoming
    • Upload Download
      upcoming
  • insert_chartData Visualization
    • 💡 Overview
    • Tiering
    • Pattern
    • Chart and Graph
      • Chart Selection Guide
      • Map Selector
      • Donut Chart
      • Donut Progress Bar Chart
      • Spider Chart
      • Line Chart
      • Chart Area
      • Speedometer
      • Heat Map
      • Scatter Plot
      • Pie Chart
      • Bar Chart
      • Waterfall Chart
      • Sunburst Chart
      • Tree Decomposition Chart
      • Scorecards
      • Table
      • Micro Visualization
    • Typography
    • Color Palette
  • data_objectTokens
    upcoming
  • inventory_2Resources
    • 💡 Overview
    • Mobile
      new
      • 💡 Introduction
      • Installation
      • General
        • Important Rules
        • Naming Convention
        • Clean Architecture
    • Web
      upcoming
GeneralNaming ConventionSet of rules and guidelines for naming variables, functions, classes, files, and other entities in your code.
Naming Common
Avoid abbreviations, except for abbreviations that are common in

Naming Components

Use of UI prefixes on each component or widget class. The UI prefix makes it clear that a component is related to the user interface, distinguishing it from business logic, utilities, or data models

class UIButton {}
Do's
class Button {}
Don't

Naming Files



  • Use lower_case_underscore_withsuffix on each file that will be used.
  • Assign the suffix to parent folder above it.
.
└── components/
    └── presentation/
        ├── pages/
        │   ├── login.page.dart
        │   └── register.page.dart
        ├── widgets/
        │   └── text_field.widget.dart
        └── controller/
            ├── login_page.controller.dart
            └── register_page.controller.dart
Do's
.
└── components/
    └── presentation/
        ├── pages/
        │   ├── LoginPage.dart
        │   └── RegisterPage.dart
        ├── widgets/
        │   └── TextFieldWidget.dart
        └── controller/
            ├── LoginPageController.dart
            └── RegisterPageController.dart
Don't

More Example Naming File

Here the example for naming file screen, page, model, etc.

  • : file_name.screen.dart
  • : file_name.page.dart
  • : file_name.model.dart
  • : file_name.response.dart or file_name.request.dart
  • : file_name.constant.dart
  • : file_name.translate.dart

Note for Developers

This naming convention aims to ensure that all names in one project are similar to the structure that has been created, and avoid problems or issues such as being deprecated or naming errors that do not match Clean Code which occur when files and classes are created.

Problem

In the example below vscode will automatically provide output (problems) when we do not meet the naming standards using the Naming Convention, an unwanted warning occurs.

Solving

When we have implemented the Naming Convention for each class, it will greatly minimize the occurrence of warnings from the output (problems) in VScode.

arrow_back
Previous Important Rules
Next Clean Architecture
arrow_forward