CmsMediaEntry class
CmsEntry for handling images
Constructors
-
CmsMediaEntry({required String key, required CmsMediaDelegate delegate, required List<
CmsMediaType> supportedMedia, required CmsMediaType mediaTypeBuilder(dynamic object), String urlBuilder(dynamic object)?, dynamic valueBuilder(CmsMediaUploadRes res, XFile file)?, String? label, CmsEntryModifier modifier = const CmsEntryModifier(expanded: true), int flex = 2})
Properties
- delegate → CmsMediaDelegate
-
final
- 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 size of the
CmsTableItemin theCmsTablefinal - Defines size of the
- 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. It may be staggered e.g.
user.data.image. To see how it works check JsonMapExtensionsfinal - key is a path to the value in JsonMap. It may be staggered e.g.
- label → String?
-
- label displays the name of the entry. To find out more check fixedLabel
final - mediaTypeBuilder → CmsMediaType Function(dynamic object)
-
Function that determines CmsMediaType based on object's JsonMap
final
- modifier → CmsEntryModifier
-
Modifies the behavior of the CmsEntry
final
- pinned → bool
-
no setterinherited
- 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
-
supportedMedia
→ List<
CmsMediaType> -
final
- urlBuilder → String Function(dynamic object)?
-
getter for url from object's JsonMap
final
- valueBuilder → dynamic Function(CmsMediaUploadRes res, XFile file)?
-
Optional custom object created from upload response and file
final
Methods
-
buildEditField(
{required BuildContext context, required Iterable? value, required void onChanged(Iterable? value)}) → Widget -
Builder for edit/create flow. It provides
context, currentvalueandonChangedmethod. It is recommended to wrap it in the CmsFieldWrapper.override -
buildPreview(
BuildContext context, Iterable? value) → Widget -
Preview of the value shown in the
CmsTableoverride -
fromJson(
Object? json) → Iterable? -
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(
Iterable? 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