CodelesslyWidget class

SDK widget that requires the SDK to be initialized beforehand.

The SDK can be instantiated in several ways:

  1. Using the global instance of the SDK by not passing any of the relevant parameters. Initialization of the global instance is done implicitly if not already initialized.

  2. Using a custom codelessly instance, initialization of the codelessly instance must be done explicitly.

  3. Using a custom config, which will be used to initialize the global codelessly instance.

  4. Using a controller, which can be customized in any of the ways described above but with explicit control over the state.

Inheritance

Constructors

CodelesslyWidget({Key? key, String? layoutID, CodelesslyWidgetController? controller, Codelessly? codelessly, CodelesslyConfig? config, PublishSource? publishSource, WidgetBuilder? loadingBuilder, CodelesslyWidgetErrorBuilder? errorBuilder, CodelesslyWidgetLayoutBuilder? layoutBuilder, LayoutRetrieverBuilder? layoutRetrievalBuilder, AuthManager? authManager, DataManager? publishDataManager, DataManager? previewDataManager, DataManager? templateDataManager, CacheManager? cacheManager, Map<String, dynamic> data = const {}, Map<String, CodelesslyFunction> functions = const {}, Map<String, WidgetBuilder> externalComponentBuilders = const {}, CodelesslyContext? codelesslyContext})
Creates a CodelesslyWidget.

Properties

authManager AuthManager?
Optional auth manager for advanced control over the SDK's authentication flow.
final
cacheManager CacheManager?
Optional cache manager for advanced control over the SDK's caching behavior.
final
codelessly Codelessly?
The Codelessly instance to use.
final
codelesslyContext CodelesslyContext?
Optional CodelesslyContext that can be provided explicitly if needed.
final
config CodelesslyConfig?
Holds initialization configuration options for the SDK.
final
controller CodelesslyWidgetController?
An external CodelesslyWidgetController to use. If this is not provided, an internal one will be created.
final
data Map<String, dynamic>
Holds a map of data to replace.
final
errorBuilder CodelesslyWidgetErrorBuilder?
Optional placeholder widget to show if the layout fails to load.
final
externalComponentBuilders Map<String, WidgetBuilder>
Optional map of widget builders used to build dynamic widgets.
final
functions Map<String, CodelesslyFunction>
Holds a map of functions to run when called.
final
hashCode int
The hash code for this object.
no setterinherited
key Key?
Controls how one widget replaces another widget in the tree.
finalinherited
layoutBuilder CodelesslyWidgetLayoutBuilder?
Optional widget builder to wrap the rendered layout widget with for advanced control over the layout's behavior.
final
layoutID String?
The ID of the layout provided from your Codelessly dashboard. This represents a single screen or canvas.
final
layoutRetrievalBuilder LayoutRetrieverBuilder?
Returns a widget that decides how to load nested layouts of a rendered node.
final
loadingBuilder WidgetBuilder?
Optional placeholder widget to show while the layout is loading.
final
previewDataManager DataManager?
Optional preview data manager for advanced control over the SDK's preview data flow.
final
publishDataManager DataManager?
Optional publish data manager for advanced control over the SDK's publish data flow.
final
publishSource PublishSource?
Whether to show the preview version of the provided layout rather than the published version.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
templateDataManager DataManager?
Optional template data manager for advanced control over the SDK's template data flow.
final

Methods

createElement() StatefulElement
Creates a StatefulElement to manage this widget's location in the tree.
inherited
createState() State<CodelesslyWidget>
Creates the mutable state for this widget at a given location in the tree.
override
debugDescribeChildren() List<DiagnosticsNode>
Returns a list of DiagnosticsNode objects describing this node's children.
inherited
debugFillProperties(DiagnosticPropertiesBuilder properties) → void
Add additional properties associated with the node.
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toDiagnosticsNode({String? name, DiagnosticsTreeStyle? style}) DiagnosticsNode
Returns a debug representation of the object that is used by debugging tools and by DiagnosticsNode.toStringDeep.
inherited
toString({DiagnosticLevel minLevel = DiagnosticLevel.info}) String
A string representation of this object.
inherited
toStringDeep({String prefixLineOne = '', String? prefixOtherLines, DiagnosticLevel minLevel = DiagnosticLevel.debug}) String
Returns a string representation of this node and its descendants.
inherited
toStringShallow({String joiner = ', ', DiagnosticLevel minLevel = DiagnosticLevel.debug}) String
Returns a one-line detailed description of the object.
inherited
toStringShort() String
A short, textual description of this widget.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited