clone method

  1. @override
FastItem<T> clone()
override

Creates a copy of this TModel.

For example:

var myModel2 = myModel1.clone();

Implementation

@override
FastItem<T> clone() {
  return FastItem<T>(
    descriptor: descriptor?.clone(),
    normalizedLabelText: normalizedLabelText,
    descriptionText: descriptionText,
    categories: categories?.map((c) => c.clone()).toList(),
    isEnabled: isEnabled,
    labelText: labelText,
    value: value,
  );
}