PlutoColumnGroup constructor
PlutoColumnGroup({
- required String title,
- List<
String> ? fields, - List<
PlutoColumnGroup> ? children, - EdgeInsets? titlePadding,
- InlineSpan? titleSpan,
- PlutoColumnTextAlign titleTextAlign = PlutoColumnTextAlign.center,
- bool? expandedColumn = false,
- Color? backgroundColor,
- Key? key,
Implementation
PlutoColumnGroup({
required this.title,
this.fields,
this.children,
this.titlePadding,
this.titleSpan,
this.titleTextAlign = PlutoColumnTextAlign.center,
this.expandedColumn = false,
this.backgroundColor,
Key? key,
}) : assert(fields == null
? (children != null && children.isNotEmpty)
: fields.isNotEmpty && children == null),
assert(expandedColumn == true
? fields?.length == 1 && children == null
: true),
_key = key ?? UniqueKey() {
hasFields = fields != null;
hasChildren = !hasFields;
if (hasChildren) {
for (final child in children!) {
child.parent = this;
}
}
}