# Fetch sections

You can retrieve the blocks of the project with the function **`MBManager.shared.getSections()`** like this:

```dart
MBPaginatedResponse<MBSection> sections =
    await MBManager.shared.getSections(blockId: THE_BLOCK_ID);
```

The **`parameters`** value is an array of **`MBParameter`** objects as described in the previous section.

You can set the `includeElements` parameter to `true` if you want to include also the elements of the sections.

If you want to retrieve all the sections of a block and their elements you can call:

```dart
MBPaginatedResponse<MBSection> sections =
      await MBManager.shared.getSections(
      blockId: THE_BLOCK_ID,
      includeElements: true,
      );
```

### Elements

If you include the elements, the propery `elements` of the section will be populated. The type of elements available are:

* `MBTextElement`: represents a text
* `MBImagesElement`: represents an image
* `MBMediaElement`: a fille, audio, video or document
* `MBCheckboxElement`: a checkbox
* `MBRelationElement`: a relation between blocks
* `MBMarkdownElement`: a markdown element
* `MBAddressElement`: an address, with its coordinates
* `MBColorElement`: a color
* `MBDateElement`: a date
* `MBDropdownElement`: a dropdown, with its possible values and the selected one
* `MBGeneralElement`: a general element, returned when the type is not recognized


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.mburger.cloud/flutter-sdk/fetch-sections.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
