getExtendUI method
Implementation
Widget getExtendUI(LevelsBaseModel item) {
late Widget extendItem;
switch (levelExtendsUI) {
case ShowPickExtendsUI.extendsNone:
extendItem = Text('');
break;
case ShowPickExtendsUI.extendsLabel:
extendItem = extendLabel ??
Text(
placeHolderText,
style: TextStyle(color: Colors.blue, fontSize: 14),
);
break;
case ShowPickExtendsUI.extendsIcon:
{
extendItem = IconButton(
onPressed: () {
if (_preCacheModel == item) {
item.setSelected(!item.selected);
} else {
if (_preCacheModel != null) {
_preCacheModel.setSelected(false);
}
item.setSelected(!item.selected);
if (item.selected) {
_preCacheModel = item;
}
}
callBack?.call(item, this);
},
icon: Image.asset(
item.selected
? 'images/system_radio_sel.png'
: 'images/system_radio_nor.png',
package: 'flutter_quick_views',
));
}
break;
default:
}
return extendItem;
}