CmsLinkEntry class

CmsEntry that renders a value as a clickable hyperlink.

The stored value is either a URL String, or a { 'url': ..., 'name'?: ... } map whose optional name is the visible link text (the URL itself is shown when no name is set). Tapping opens the URL with url_launcher, unless a custom onTap is supplied. The edit field exposes an optional label and the URL.

Inheritance

Constructors

CmsLinkEntry({required String key, String? label, void onTap(String url)?, CmsEntryModifier modifier = const CmsEntryModifier(expanded: true), int? flex = 3, double? width})

Properties

editable → bool
no setterinherited
expanded → bool
no setterinherited
fixedLabel → String
Real display of the field. If null, last segment of key is displayed
no setterinherited
fixedLabelRequired → String
Adds * at the end of the label
no setterinherited
flex → int?
Defines the column's share of the CmsTableItem width in the CmsTable.
final
hashCode → int
The hash code for this object.
no setterinherited
initializable → bool
no setterinherited
key → String
key is a path to the value in JsonMap.
final
label → String?
label displays the name of the entry.
final
modifier → CmsEntryModifier
Modifies the behavior of the CmsEntry
final
onTap → void Function(String url)?
Called with the URL when the link is tapped. Defaults to launching it via url_launcher.
final
required → bool
no setterinherited
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
sortable → bool
no setterinherited
sortInvertNulls → bool
no setterinherited
width → double?
Width of a fixed (non-flexing) column, i.e. the width used when flex is null. Ignored while flex is non-null.
final

Methods

buildEditField({required BuildContext context, required dynamic value, required void onChanged(dynamic)}) → Widget
Builder for edit/create flow.
override
buildPreview(BuildContext context, dynamic value) → Widget
Preview of the value shown in the CmsTable
override
fromJson(Object? json) → dynamic
simple fromJson method, e.g. int.parse(json.toString) for an int value.
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
onSaved() → Future<void>
inherited
toJson(dynamic value) → Object?
simple toJson method, e.g. 12.toString for an int value.
inherited
toString() → String
A string representation of this object.
inherited

Operators

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