calculateTotalRequiredWidth<T, K> static method

double calculateTotalRequiredWidth<T, K>(
  1. List<TTableHeader<T, K>> headers,
  2. bool selectable,
  3. bool expandable, {
  4. int maxTreeLevel = 0,
  5. bool isHierarchical = false,
  6. List<T> sampleItems = const [],
  7. TextStyle? headerTextStyle,
  8. TextStyle? contentTextStyle,
})

Calculates the minimum total width required for the table view (used to decide table-vs-card layout). Shares the exact same measurement as calculateColumnWidths so the two can never disagree.

Implementation

static double calculateTotalRequiredWidth<T, K>(
  List<TTableHeader<T, K>> headers,
  bool selectable,
  bool expandable, {
  int maxTreeLevel = 0,
  bool isHierarchical = false,
  List<T> sampleItems = const [],
  TextStyle? headerTextStyle,
  TextStyle? contentTextStyle,
}) {
  return measureColumns<T, K>(
    headers,
    selectable,
    expandable,
    maxTreeLevel: maxTreeLevel,
    isHierarchical: isHierarchical,
    sampleItems: sampleItems,
    headerTextStyle: headerTextStyle,
    contentTextStyle: contentTextStyle,
  ).requiredWidth;
}