TinkWidgetHandler mixin
- Implemented types
Properties
- addChildFieldName ↔ String?
-
getter/setter pair
-
args
↔ Map<
String, dynamic> -
getter/setter pair
-
attributes
→ Set<
TinkWidgetAttribute> -
no setter
- canAcceptChildren ↔ bool
-
Widgets that can have other widgets dropped on them should set this to true
If it is false, this handler's widget will not be considered for drag/drop events
getter/setter pair
- canPersist ↔ bool
-
getter/setter pairoverride
-
children
→ List<
ChildWidget> -
no setter
- currentRuntimeCtx ↔ TinkWidgetRuntimeContext?
-
getter/setter pair
- currentScreen → ScreenModel?
-
no setter
-
def
↔ WidgetDefModel<
PropertyModel, EventModel> -
getter/setter pair
- delegate ↔ TinkWidgetHandler
-
An implementation that is guaranteed to provide a default for all APIs in this mixin
getter/setter pair
- device ↔ TargetDevice
-
getter/setter pair
- entityGroupId → String
-
groupId = Widget | Screen | Component
no setteroverride
- entitySubType → String
-
subtype = ScreenHandler
no setteroverride
- entityType → String
-
type = Handler
no setteroverride
-
events
↔ Set<
EventModel> -
getter/setter pair
-
fields
→ List<
TinkEntityField> -
no setteroverride
-
fieldsByName
↔ Map<
String, TinkEntityField> -
getter/setter pairoverride
- groupId → String
-
The Hypi editor's "Add Component" area has groups.
This ID identifies the group in which this widget is placed.
no setteroverride
- hasChildren → bool
-
no setter
- hashCode → int
-
The hash code for this object.
no setterinherited
- highlight ↔ bool
-
getter/setter pair
- hypi ↔ HypiMeta
-
getter/setter pairoverride
- id ↔ String
-
getter/setter pairoverride-getter
- isChildFieldAList ↔ bool?
-
getter/setter pair
- isRuntimeMode → bool
-
no setter
-
key
→ GlobalKey<
State< StatefulWidget> > -
no setter
- label → String
-
A user friendly name to display when identifying this object to the user in the editor.
no setteroverride
- parent ↔ TinkWidgetHandler
-
getter/setter pair
- renderMode → TinkRenderMode
-
no setter
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- self ↔ TinkWidgetHandler
-
The handler that, if this is the delegate, this delegates for. If it is not the delegate self == this
getter/setter pair
- serialisableIsAlive ↔ BoolCallback?
-
getter/setter pairoverride
- settingHandle ↔ bool
-
getter/setter pair
Methods
-
addChildHandler(
TinkWidgetHandler child) → void -
canAcceptChildNodes(
{required String childFieldName, required bool isList}) → void -
canHandleDropped(
Offset offset, dynamic data) → bool -
details
is either DragTargetDetails<dynamic> or a string that is the name of the widget dropped or if it was re-arranged then it is the widget itself that was dropped -
childEntityField(
String fieldName) → EntityField -
constructTree(
String widgetName, Map< String, Either< children, {Map<TinkWidgetHandler, List< >TinkWidgetHandler> >String, dynamic> ? props}) → TinkWidgetHandler -
droppedOnRootCanvas<
T extends WidgetDefModel< (PropertyModel, EventModel> >T def, Offset offset, dynamic data) → void - Called when a new instance must be created to render on screen
-
emit<
S> (TinkStateEvent< S> current) → CASMLike -
override
-
emitEvent(
EventModel event) → void -
getChildByName(
String name) → ChildWidgetValue? -
handleDropped(
Offset offset, dynamic data) → void -
highlightWidget(
Widget widget) → Widget -
initDelegate(
TinkWidgetHandler delegate, TinkWidgetHandler self) → void - Called to provide an initialisation point for delegate implementations. Must be called by implementations or they must initialise delegate and self themselves AND call this on the delegate
-
intersects(
Offset activityPosition) → TinkWidgetHandler? -
listenForAttributeChanges(
) → void -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
on<
S> (String name, CASMEventHandler< S> f, {TinkStateEventType? type = TinkStateEventType.update, bool emitLatest = true, bool subscribe = true, TinkLivenessHandler? state}) → CASMLike -
override
-
onLeave(
) → bool -
onMove(
Offset offset, dynamic data) → bool -
onNodeTreeAccept(
TreeNodeHandler handler) → dynamic -
override
-
onNodeTreeAcceptWithDetails(
DragTargetDetails< TreeNodeHandler> details) → dynamic -
override
-
onNodeTreeLeave(
TreeNodeHandler? details) → dynamic -
override
-
onNodeTreeMove(
DragTargetDetails< TreeNodeHandler> details) → dynamic -
override
-
onNodeTreeWillAccept(
TreeNodeHandler? dropped) → dynamic -
override
-
onUpdate(
EntityEventSource src) → void -
When invoked, the entity should use the event source to obtain the most recent value for each of its fields, internally performing an update where necessary
Implementations can override this if for example they only want to update selected fields they can use EntityEventSource.valueOf
override
-
postDeserialisation(
) → void -
override
-
removeChild(
TinkWidgetHandler oldChild) → void -
removeChildByName(
String name) → void -
render(
) → Widget -
rerender(
dynamic fn()) → void - If this widget has setup a runtime context then call setState which will trigger a rebuild If it hasn't then the whole screen will be re-built to force the update to become visible to the user Obviously rebuilding the screen is more expensive so most widgets should provide a TinkWidgetRuntimeContext when in runtime mode.
-
save(
CASMLike casm) → dynamic -
override
-
setArg(
String name, dynamic value) → void -
setAttr(
TinkWidgetAttribute attr, TinkAttributeEvent current) → void - Called when the given attribute has been given a new value. This assumes the attribute can/should be directly set in the args passed to the widget
-
setChild(
String name, ChildWidgetValue value) → void -
setChildIfAbsent(
String name, ChildWidgetValue value()) → ChildWidgetValue -
setNonListChild(
String argName, TinkWidgetHandler child) → void -
showSettingsHandle(
) → void -
showWidgetProperties(
BuildContext context, StateSetter setState) → Widget -
subscribeToUpdates(
CASMLike casm) → dynamic -
override
-
swapChild(
TinkWidgetHandler oldChild, TinkWidgetHandler newChild) → void -
toString(
) → String -
A string representation of this object.
inherited
-
triggerEditorRebuild(
VoidCallback fn) → void
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited