TabularLegendLayout.horizontalFirst constructor

TabularLegendLayout.horizontalFirst({
  1. int? desiredMaxColumns,
  2. EdgeInsets? cellPadding,
})

Layout horizontally until columns exceed desiredMaxColumns.

desiredMaxColumns the max columns to use before laying out items in a new row. By default there is no limit. The max columns created is the smaller of desiredMaxColumns and number of legend entries.

cellPadding the EdgeInsets for each widget.

Implementation

factory TabularLegendLayout.horizontalFirst({
  int? desiredMaxColumns,
  EdgeInsets? cellPadding,
}) {
  return TabularLegendLayout._internal(
    isHorizontalFirst: true,
    desiredMaxRows: _noLimit,
    desiredMaxColumns: desiredMaxColumns ?? _noLimit,
    cellPadding: cellPadding,
  );
}