CmsDropdownEntry<T> class

CmsEntry for handling offline items picker

Inheritance

Constructors

CmsDropdownEntry({required String key, required List<T> values, required String valueLabelBuilder(T? value), T? defaultValue, String? label, CmsEntryModifier modifier = const CmsEntryModifier(), int flex = 2})
CmsDropdownEntry.simple({required String key, required List<T> values, required String valueLabelBuilder(T? value), String? label, T? defaultValue, CmsEntryModifier modifier = const CmsEntryModifier(), int flex = 1})

Properties

defaultValue → T?
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 CmsTableItem 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. It may be staggered e.g. user.data.image. To see how it works check JsonMapExtensions
  • final
    label String?
  • label displays the name of the entry. To find out more check fixedLabel
  • 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
    valueLabelBuilder String Function(T? value)
    final
    values List<T>
    final

    Methods

    buildEditField({required BuildContext context, required T? value, required void onChanged(T value)}) Widget
    Builder for edit/create flow. It provides context, current value and onChanged method. It is recommended to wrap it in the CmsFieldWrapper.
    override
    buildPreview(BuildContext context, T? value) Widget
    Preview of the value shown in the CmsTable
    override
    fromJson(Object? json) → T?
    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(T 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