FLStaticItemData constructor
FLStaticItemData({
- FLStaticListCellType cellType = FLStaticListCellType.normal,
- Widget? leading,
- String? title,
- TextStyle? titleStyle,
- String? subtitle,
- TextStyle? subtitleStyle,
- FLStaticListCellAccessoryType accessoryType = FLStaticListCellAccessoryType.accNone,
- String? accessoryString,
- Widget? customTrailing,
- Color? cellColor,
- VoidCallback? onTap,
- bool accItemValue = false,
- bool selected = false,
- ValueChanged<
bool?> ? onChanged, - String? buttonTitle,
- Color? buttonTitleColor,
- Color? buttonColor,
- VoidCallback? onButtonPressed,
- Widget? customizeContent,
Implementation
FLStaticItemData({
this.cellType = FLStaticListCellType.normal,
this.leading,
this.title,
this.titleStyle,
this.subtitle,
this.subtitleStyle,
this.accessoryType = FLStaticListCellAccessoryType.accNone,
this.accessoryString,
this.customTrailing,
this.cellColor,
this.onTap,
this.accItemValue = false,
this.selected = false,
this.onChanged,
this.buttonTitle,
this.buttonTitleColor,
this.buttonColor,
this.onButtonPressed,
this.customizeContent,
}) : assert(() {
if (cellType == FLStaticListCellType.normal &&
(leading == null && title == null && subtitle == null)) {
throw AssertionError(
'List cell must have a leading or title or subtitle',
);
}
if (cellType == FLStaticListCellType.customization &&
customizeContent == null) {
throw AssertionError(
'Must specify the content when cell\s type is customization',
);
}
if (customTrailing != null &&
accessoryType != FLStaticListCellAccessoryType.accNone) {
throw AssertionError(
'Could not set trailing widget when accessory type != none');
}
if (accessoryString != null &&
accessoryType != FLStaticListCellAccessoryType.accDetail) {
throw AssertionError(
'Accessory string only can be shown when cell\'s accessory type is accDetail');
}
return true;
}()),
super();