You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- New simplified variables system. Variables passed into the CodelesslyWidget can now be referenced by name in the Codelessly Editor.
```
CodelesslyWidget(
data: {
'title': 'My Title',
'productData': { // JSON Data
'nested': {
'json': {
'path': 'Hey there!',
}
}
}
}
)
// Now you can access the variable directly in the Codelessly Editor.
${title} - 'My Title'
// Or, using the `data` object.
${data.title} - 'My Title'
${data.productData.nested.json.path} - 'Hey there!'
```
- New SVG image support!
- New hosted website publishing support.
- Add `>=`, `<=`, and `== null` operators.
- Add data and variable support for dropdown component.
- Add Material 3 Switch UI component.
- Add Rounded Circular Progress Indicator component.
- Improve InkWell behavior. Show Inkwell effect on top of other widgets.
- Prototype implementation of custom widget embedding feature.
Copy file name to clipboardExpand all lines: README.md
+9-7
Original file line number
Diff line number
Diff line change
@@ -28,7 +28,7 @@ Initialize Codelessly before calling `runApp()`.
28
28
```dart
29
29
void main() {
30
30
WidgetsFlutterBinding.ensureInitialized();
31
-
31
+
32
32
// Initialize SDK.
33
33
Codelessly.instance.initialize(
34
34
config: CodelesslyConfig(
@@ -84,7 +84,7 @@ class MyApp extends StatelessWidget {
84
84
85
85
The `CodelesslyWidget` can be used like any other widget and embedded anywhere in your app. It can even be used to render entire pages as the root widget!
86
86
87
-
From dynamic forms to constantly changing sales and marketing pages, any design or layout can be streamed to your app via the `CodelesslyWidget`.
87
+
From dynamic forms to constantly changing sales and marketing pages, any design or layout can be streamed to your app via the `CodelesslyWidget`.
88
88
89
89
To learn how to use the Codelessly editor to publish layouts, check out our [3-minute Quickstart Guide](https://docs.codelessly.com/getting-started/3-minute-quick-start).
90
90
@@ -103,15 +103,17 @@ CodelesslyWidget(
103
103
104
104
#### **Step 1:** Define variables in the Codelessly Editor
105
105
106
-
Use the `${}` templating syntax in input fields to link data from the Codelessly editor to layouts as shown below.
106
+
Use the `${}` templating syntax in input fields to link data from the Codelessly editor to layouts as shown below.
107
107
108
108

109
109
110
-
To link the title of a text widget to the `title` variable in the Codelessly editor, put `${data.title}` in the text widget’s text field.
110
+
To link the title of a text widget to the `title` variable in the Codelessly editor, put `${title}` in the text widget’s text field.
111
111
112
-
> **Note:** The `data` object contains all the variables passed to the CodelesslyWidget.
112
+
> **Note:** All data passed into the Codelessly widget is stored in the `data` object.
113
+
>
114
+
> You can access the `title` variable with `${title}` or `${data.title}`.
113
115
>
114
-
> Use `${data.title}` to access the `title` variable passed from the client. `${title}` alone is a Codelessly variable and will try to load variables defined in Codelessly, not your client.
116
+
> Use `data` to reference nested JSON payloads. Example: ${data.productData.nested.json.path}
115
117
116
118
#### **Step 2:** Pass data to the layout from your app.
117
119
@@ -212,7 +214,7 @@ CodelesslyWidget(
212
214
213
215
When `isPreview` is set to true, the CodelesslyWidget will stream UI updates from the Codelessly Editor in realtime. Any edits to the UI in the editor will update in the app immediately. We think this is a pretty amazing feature so give it a try!
214
216
215
-
Use preview mode to test and prototype UI quickly.
217
+
Use preview mode to test and prototype UI quickly.
0 commit comments