codelessly_api 6.1.0
codelessly_api: ^6.1.0 copied to clipboard
Flutter's layouts and widgets represented as models and JSON data. This API is used by the Codelessly Editor and CloudUI SDK to render Flutter Widgets.
6.1.0 #
States and conditions #
InteractionState(hover, focus, pressed, selected, disabled) andBaseNode.interactionStates: sparse property overrides per state.Variant.overridesfor property-override states;PropertyOverridePatchapplies, diffs and merges them.- Query-status variants (loading, empty, error) with an optional skeleton.
Data #
CollectionSchemaandSchemaFieldfor typed collections.CloudDataAction(create, update, delete, get, query, count, sum, average) andCloudBatchActionbuilt from schemas, without JSON.QueryableMixin.paging(scroll or a Show more button) andQueryableMixin.loadRelatedfor reference fields.CloudFilesAction.access: uploads are private to the uploader by default.
Auth, actions and variables #
AuthOperationadds Google, Apple and email-link sign-in andupdatePhoto.TriggerModel.debounceMsand thevalueChangedtrigger.BaseNode.tooltipandBaseNode.zoomable.VariableType.choicewith named options.ThemeTokensfor what the runtime draws itself.- A value read as a paint turns an image link into an image paint.
6.0.0 #
Breaking changes #
ButtonProperties.buttonColoris nullable and defaults tonull, the button type's default colour. It was black, and black was left out of the JSON, so a missing key now reads asnulland an explicit black is written and read back as black.ShowToastAction.backgroundColorandtextColorare nullable and default tonull(the app's theme). Saved toasts, which omitted the old defaults, now take the theme's colours.copyWithgainsclearBackgroundColorandclearTextColor.
New #
- Responsive variances:
ScreenBreakpoint(mobile, tablet, desktop; widths 600 and 1024, design widths 390/834/1440), an optionalVariant.breakpoint(omitted from JSON when unset), andVarianceNode.isResponsive,variantForBreakpointandvariantForWidth. ShowToastAction: a button (actionLabelandactions, e.g. Undo), aToastStyleand aToastPosition(top or bottom).ConfirmActioncan show a canvas as its dialog (dialogId,params), which answers through a Navigate back action whose params holdconfirmed, and has optional colour, radius and barrier overrides for the built-in dialog.TextFieldProperties.maxLines:null(unlimited lines) is written as an explicitnulland reads back asnull; a missing key still reads as 1.VariableData.getValue()returns an empty text variable as''instead ofnull, and anullvalue is stored as''instead of'null'.AuthOperation.sendEmailVerification,updatePasswordanddeleteAccount.DelayAction(ActionType.delay): waitsmillisecondsbefore the next action runs.CanvasProperties.signInRedirectId: a screen that needs a signed-in user sends signed-out users to that canvas (requiresSignIn).ListViewNode.statusVariableandGridViewNode.statusVariable: a text variable a cloud list writes its query status into (kQueryStatusLoading,kQueryStatusEmpty,kQueryStatusError,kQueryStatusLoaded), for loading, empty and error states.ConfirmAction(ActionType.confirm): asks the user to confirm with a title, message and button labels (optionally destructive), then runsactionson confirm orcancelActionson cancel.
Fixes #
- Web view nodes always write their
webviewType,mapModeandembedTypediscriminators, so they read back from JSON. - Empty action lists, maps and sets are left out of JSON (conditional, for-each and cloud files actions, API call parameters, call function params, else conditions, condition groups, variable extras, text field autofill hints and variance properties); 5.2.0 and 5.3.0 read the shorter JSON back to equal objects.
NodeProcessor.updateNoderewrites edge pins from the node's box only for freeform children with no alignment (NodeProcessor.edgePinsPosition); children of rows and columns and aligned children keep their pins.
5.3.0 #
ShowToastAction(ActionType.showToast): shows a short message at the bottom of the screen, with an optional icon, colors, duration and offset.- Every node with fills, strokes or opacity now lists
fill,strokeandopacityin its property variables, and every node listswidthandheight, so conditions, bound variables and set value actions can change them at runtime.
5.2.0 #
New actions #
AuthAction(ActionType.auth): sign up, sign in, sign out, update the profile and send a password reset email (AuthOperation), with an optional error variable.ConditionalAction(ActionType.conditional): an expression with then/else action lists, so action chains can branch.ForEachAction(ActionType.forEach): runs actions for each item of a list variable.CloudFilesAction(ActionType.cloudFiles): picks and uploads images to the project's storage, or deletes a file, running nested actions per file.
Changes #
RowColumnNodehas a corner radius.- 8-digit
#AARRGGBBcolors set the paint's opacity when none is given. - Dates in list and map variables encode as ISO 8601 strings
(
encodeJsonValue), andVariableType.fromObjectTypemapsDateTimeto text.
5.1.0 #
New nodes #
BadgeNode('badge'): Material 3Badgeas a dot, label or count (BadgeType), optionally anchored to another node throughchildID.BadgePropertiesmirrors Flutter'sbackgroundColor,textColor,textStyle,smallSize,largeSize,padding,isLabelVisibleandBadge.count'smaxCount, plusBadgeAlignmentand anoffsetX/offsetYoffset (Flutter's defaultOffset(4, -4)).ChipNode('chip'): Material 3Chip,ActionChip,ChoiceChip,FilterChipandInputChip(ChipType).ChipPropertiescovers the label and its style, an icon or image avatar, the delete icon and its color, selection withshowCheckmark/checkmarkColor, colors, border, corner radius, elevation, paddings (Material 3 defaults: 8 px padding, 8 px horizontal label padding),tooltipandautofocus. Choice and filter chips expose aselectedproperty variable.SegmentedButtonNode('segmentedButton'): Material 3SegmentedButton<String>built fromButtonSegmentModels, withselected,multiSelectionEnabled,emptySelectionAllowed,showSelectedIcon,selectedIcon,direction, border, foreground and background colors for both states and a stadium-shaped default corner radius. The selection is exposed as theselectedproperty variable.- All three are registered with
NodeJsonConverter.
JSON #
- These nodes first appeared on the unreleased
migrate-json-serializablebranch. JSON written with it still loads: keys are unchanged where a field was renamed to its Flutter name (dotSizeholdsBadgeProperties.smallSize,labelStyleholdsBadgeProperties.textStyle,selectedSegmentsholdsSegmentedButtonProperties.selected,selectedColor/unselectedColorholdselectedBackgroundColor/backgroundColor), and field access uses the same keys. - As with every other node, fields that equal their defaults are omitted.
5.0.0 #
Breaking changes #
- Require Dart 3.13.
- Replace the forked
codelessly_json_annotationandcodelessly_json_serializablewith the standardjson_annotationandjson_serializable. Custom nodes should importpackage:json_annotation/json_annotation.dart.DateTimeConverteris now exported by this package. - Upgrade to equatable 3, which removes
EquatableMixin; models mix inEquatableinstead. - Remove the unused blend and
valueconstructor parameters ofLoadingIndicatorNode,ProgressBarNodeandDividerNode, which were silently discarded. - Remove the unused
automaticChevronparameter ofExpansionTileProperties.copyWith.
JSON #
- Serialized JSON is unchanged: fields that equal their defaults are still
omitted, now by a small build step in
tool/json_defaults_builder. Golden tests pin the output against 4.4.0. - Cloud database query
whereFilters/orderByFiltersare omitted when empty; they read back as empty lists.
Flutter parity #
- Mirror new Flutter values:
TextAlignHorizontalEnum.start/end,ButtonTypeEnum.filled/filledTonal,FABLocation.endContained,TextInputTypeEnum.webSearch/twitter,AutovalidateModeC.onUnfocus/onUserInteractionIfError,SliderTrackShapeEnum.gapped,SliderValueIndicatorShape.drop/roundedRectangleandCShapeBorder.roundedSuperellipse. - Add Flutter parameters that were missing:
AppBarProperties.foregroundColor,scrolledUnderElevationTabBarProperties.tabAlignment(newTabAlignmentC),dividerHeightRadioProperties.side,innerRadius,backgroundColorSliderProperties.showValueIndicator(newShowValueIndicatorC),secondaryTrackValue,secondaryActiveTrackColor,paddingListTileProperties.minTileHeight,titleAlignment(newListTileTitleAlignmentC)MaterialLoadingIndicatorProperties.strokeAlign,trackGapExpansionTileProperties.showTrailingIcon,shape,collapsedShape,cornerRadiusTextMixin.softWrap,textScaleFactorMultiSourceIconModel.fill,weight,grade,opticalSize(the Material Symbols variable-font axes)PageViewProperties.allowImplicitScrolling
- Document the Flutter replacements for deprecated
cacheExtent(scrollCacheExtent) andRadio.groupValue(RadioGroup). - New nodes use Material 3 defaults: switches use Material 3, buttons are stadium-shaped with 24 px horizontal padding, FABs are rounded rectangles (radius 16) with Material 3 elevations, a 56 px extended height and 8 px icon spacing, list and expansion tiles use 16/24 px content padding, tab indicators size to the label, and navigation bars use elevation 3 (M3) and 8 (M2).
- Designs saved before 5.0.0 keep their look: a missing key still reads as
the old default, and re-saving them writes the same JSON. The new
JsonLegacyDefaultannotation supports this for non-literal defaults.
Fixes #
- Register
PlaceholderNodewithNodeJsonConverter; layouts containing one failed to deserialize. ListTileNode.empty/fromPropertiesandExpansionTileNode.emptyno longer leave late fields uninitialized.FloatingActionButtonNode.emptyandEmbeddedVideoNode.emptyuse their own sizes.copyWithkeeps Dividerthickness, Dropdownenabled/dense/expanded/autoFocus/enableFeedback, FABlocation, M2 navigation bar notch settings.- Remove the
contentPaddingparameter ofInputDecorationModel.copyWith, which was ignored; a text field's content padding is its node padding. - Equality includes previously ignored fields of ExpansionTile, grid delegates, Dropdown, Divider, FAB, ListTile, TabBar, icons, web views, submit actions, Vimeo videos, condition groups and visual density.
TypedValue.toEdgeInsetsModelconverts numbers and lists again.- Add field access for
TextFieldPropertiesand the navigation bar properties.
4.4.0 #
- Add CornerRadius typedValue.
- Fix icon props deserialization for backwards compatibility.
4.3.0 #
- Create new Placeholders node.
- Add enable and disable node feature.
- Add new BlendModes support.
- Enable RenderedLayoutModel for buttons and dropdowns.
- Fix dropdown onChanged callback value.
4.2.1 #
- Fix lint issues.
4.2.0 #
- Add
NodeBox.fromCentermethod. - Use TextProp instead of StartEndProp.
4.1.0 #
- Fix AppBar constraints.
- Add
Brightnessproperty for Codelessly emulator support.
4.0.0 #
- Update codelessly_json_serializable to v4.9.0.
- Require Dart SDK v3.5 or higher.
3.0.0 #
- Owner field & admin Role migration.
- Create
wherequery API. - Add new
VariableType.image. - Add Date decoder.
2.1.0 #
- New TextInputField features! This is the first batch of improvements to the TextInput component and includes the following:
- Added Autofill Hints support.
- Added Text Input Validator.
- Added Text Input Formatter.
- Added Submit Keyboard Action selector.
2.0.2 #
- Update external components with reactions.
- Add click and long click reactions to rectangle node.
2.0.0 #
- Update Checkbox shrinkwrap and padding sizing.
- Change default Stroke cap to none.
- Optimize node sorting algorithm.
1.8.0 #
- Custom Layout IDs support! Now you can give your CloudUIs a name which makes identifying them much easier.
1.7.0 #
- Teams v1 support.
1.6.0 #
- Initial CloudUI support for Layout Groups.
- Display different layouts for different screen sizes.
1.5.0 #
- Fix text node not allowing actions.
1.4.0 #
- New StyleSheets support! Define common color and text styles.
- Update GridView
childAlignmentproperty. Minor refactor. - Improve Edge Pins.
- Fix edge pins not being saved.
- Clamp edge pins to positive values in wrapping parent layouts.
1.3.0 #
- Remove Montserrat font.
1.2.0 #
- Implement isTrue and isFalse operators for conditions.
- Refactor operator filtering to use index if available.
1.1.0 #
- New AutoComplete support for Variables.
- Fix disable automatic padding from Frames with strokes.
1.0.0 #
- Official v1 release!
- Update triggers types.
- Fix integer functions crashing with NaN and infinite values.
0.8.0 #
- Codelessly Data support. Save and write data to Codelessly Cloud.
- New GridView widget.
- Codelessly Data Query Filters support. Sort and filter data.
- Variable improvements.
- Include 'set' and 'replace' operations for list operations.
- Add new ${value} predefined variable to expose internal node data. TextFields only for now.
- Track internal value with new NodeProvider InheritedWidget per-widget.
- TextField improvements.
- Add support for actions on prefix and suffix icons on text fields.
- Fix set operation on map not showing input field.
- Implement proper TextFieldModel minimum size computation.
- Add support for TextInputType.numberWithOptions.
- JSON improvements.
- Fix json variable controller highlighting.
- Fix json syntax highlighting for storage operations.
- Fix focus nodes for json variable input fields.
- List improvements.
- Add insertAll option for list operations
- Refactor insert list operation to use json input field.
- Add copy-paste and shortcuts support for actions.
- Add support for non-blocking actions.
- Implement option to enable/disable action.
- Add firebase queries support for grid view.
- Add support for number operations.
0.7.5 #
- Fix drag and drop insert to the edge of Accordion, Expansion Tile, ListView, and PageView.
0.7.3 #
- Migrate Variables and Conditions to use permissions model.
- TextField Improvements
- Fix shrink-wrapping conflict with expands property.
- Fix text field model not calculating text field height properly for shrink-wrapping.
- Allow min lines and max lines input fields to clear.
- Fix shrink-wrap height calculation being affected by isDense property.
0.7.1 #
- Implement safe area for canvases.
- Fix scroll physics and always scrollable option.
0.7.0 #
- New Dialogs feature! 100% customizable dialogs with customizable close button, background, and padding.
- New show dialog action.
- New show dialog settings panel.
- Fix Edge Pins not syncing with server.
- Fix PageView triggers not executing.
0.6.0 #
- Embedded Canvases V1.
- Embed canvases into layouts.
- Local Storage V1.
- Store and persist data locally.
- Optimize JSON data to reduce data usage and storage by 80%.
0.5.2 #
- Remove dependency on Flutter.
0.5.1 #
- New shrink-wrap support for Buttons. Buttons can now resize based on the content inside them.
- New shrink-wrapping support for Slider, Switch, and Radio Button components.
- Fix ListView and PageView reverse scroll direction not enabled.
- Add
resolvedConstraintoverride.
0.5.0 #
- Load APIs V1.
- Fix ExpansionTiles layout and functionality issues.
- Fix reactions not being modified.
0.4.1 #
- Add hover and splash color to dropdown node.
- Miscellaneous fixes.
0.4.0 #
- New
SetMapVariableActionsupport for map variables. - Support more conditions.
isEmpty,isNotEmpty,containsisOdd,isEven,isNull
- Add
removefor list type variable. - Remove deprecations and update formatting and documentation.
0.3.0 #
- Scrolling V1. Enable scrolling for Columns, Frames, and Canvases.
- Create list operations and index for List
SetVariableAction.
0.2.0 #
- 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!'
- Add
>=,<=, and== nulloperators. - 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.
0.1.0 #
- Optimize SDK size by 90% by switching to SVG icons.
- Enable variables copy and paste.
- Enable conditions copy and paste.
- Fix canvas fill condition not working when there's only 1 fill.
0.0.8 #
- Text field and code-gen improvements.
- Add
showCounterfor input decoration. - Fix text field counter text not working properly.
- Fix text field with incorrect sizing in codegen.
0.0.7 #
- Add support for Tabs.
- Add TextField support for variables.
- Add FAB support for variables.
0.0.6 #
- Update type support to support null values.
0.0.5 #
- Add improved Variables type support.
0.0.4 #
- Add Variables and Conditions support.
0.0.3 #
- Update SDK constraints.
- Update ReadMe.
0.0.2 #
- Upgrade to Flutter 3.10 and Dart 3.
- Add support for Listview and Pageview.
- Add support for API call action.
- Remove
ScrollLinkableMixin. - Add method to compare two font weights.
- Add method to generate a random ID.
- Update example.md.
- Update documentation.
0.0.1 #
- Initial Release.