Skip to main content

Detail Rows

Detail rows insert an expandable panel beneath an eligible source row.

FdcProGrid(
dataSet: customers,
detailRow: FdcGridDetailRow(
detailHeight: null,
singleExpanded: true,
builder: (context, detailContext) {
final company = detailContext.value<String>('company') ?? '';
return Text('Details for $company');
},
),
)

Set detailHeight: null to size each panel to its content. Use minHeight and maxHeight to constrain content-sized panels.

Interaction policy

Useful options include:

FdcGridDetailRow(
builder: buildCustomerDetails,
singleExpanded: true,
collapseOnCurrentRowChange: false,
toggleOnRowTap: true,
)

canExpandRow can suppress expansion for specific rows. onExpanded and onCollapsed are notification callbacks after the state transition has been applied.