Codelessly Documentation
  • 👋Getting Started
    • ▶️Welcome Setup Guide
    • 🎉Thank you for your purchase!
    • 🔀Import Figma designs into Codelessly
    • 🖨️Publish your design as a website
  • ⚡Editor Basics
    • Start a New Project
    • Editor Tools
    • Creating Your First Layout
    • Using Components
    • Working with Size Fits
  • ⚡Advanced Editor Usage
    • Working with Variants
    • Using External Components
    • Size Fits Settings
  • ☁️Codelessly CloudUI™
    • 3-Minute Quick Start
    • Connecting Data
    • Calling Functions
  • Setting Up Custom Domains
    • Linking with Github Repository
    • Deploy on Netlify
    • Deploy on Vercel
Powered by GitBook
On this page
  • JSON Paths
  • Data Field

Was this helpful?

  1. Codelessly CloudUI™

Connecting Data

Learn how to connect data to the layouts and make them dynamic.

Previous3-Minute Quick StartNextCalling Functions

Last updated 1 year ago

Was this helpful?

JSON Paths

The first step to connect data to a node is to declare the data's path in the node itself. We do it by placing the JSON path in between ${ }. It looks something like this:

${books.chapters.titles[0]}

In case of the example weather app, we declare the JSON path that points to a temperature.

Next up, providing the data to the layout in the SDK.

Data Field

CodelesslyWidget takes in data using the data parameter which is of type Map<String, dynamic>. You can provide the data in the form of a JSON and the widget will be able to use its values internally.

CodelesslyWidget(
  data: const {
    'weather': {
      'temp': 20,
      'humidity': 34,
      'wind': 6,
    },
  }
);

Run the app. It should retrieve temp's value from the data and substitute it in place of the JSON path.

Currently, the editor supports adding dynamic data to text and image URLs.

☁️
Dynamic Temperature
Dynamic data used in widget