I want the height of each row according to the content in pluto_grid. I am rendering the rows in the table using buildRows(mainFields), for each column, I have given certain width(that is coming from backend). So, if the content exceeds the width, I am using TextOverflow.ellipsis, but I don't want that. I want the content to be visible as whole, so in that case I want the height of the row to increase so that the content can be visible completely.

I have tried using flexible, softWrap, column, it just won't work. Is there any way to show all the content in next line in the same row if it exceeds the width of the column?

 return LayoutBuilder(
  builder: (context, constraint) {
    if (constraint.maxWidth == 0) {
      return Container();
    }
    return PlutoGrid(
      key: UniqueKey(),
      //tableRebuildWhenLanguageSwitch
      noRowsWidget: const NoRecordsAvailableComponent(),
      // NoRecords
      mode: PlutoGridMode.readOnly,
      columns: buildColums(mainFields),
      rows: buildRows(mainFields),
      onSorted: (event) {
        initialSortedColumnKey = event.column.field;
        initialSortedType = event.column.sort;
        widget.callbackStoreSort(widget.applicationId,
            initialSortedColumnKey, initialSortedType.toString());
      },
      configuration: PlutoGridConfiguration(
        style: PlutoGridStyleConfig(
          defaultColumnTitlePadding: const EdgeInsets.only(left: 20),
          gridBorderRadius: BorderRadius.circular(4),
          gridBorderColor: const Color(0xFFECF0FE),
          enableCellBorderHorizontal: true,
          enableColumnBorderHorizontal: true,
          enableGridBorderShadow: true,
          menuBackgroundColor: const Color(0xFFECF0FE),
          enableCellBorderVertical: false,
        ),
        columnSize: const PlutoGridColumnSizeConfig(
            autoSizeMode: PlutoAutoSizeMode.scale,
            resizeMode: PlutoResizeMode.normal),
        scrollbar: PlutoGridScrollbarConfig(
          scrollbarThickness: 8,
          scrollbarRadius: const Radius.circular(8),
          scrollBarColor: Theme.of(context).colorScheme.primary,
        ),
      ),
    );
  },
)

i have tried using flexible , softWrap or putting it inside the column but nothing is working how can i resolve this issue

0

There are 0 best solutions below