simc / auto_size_text

Flutter widget that automatically resizes text to fit perfectly within its bounds.
https://pub.dev/packages/auto_size_text
MIT License
2.06k stars 241 forks source link

Crash with PaginatedDataTable #37

Open Ahmadre opened 5 years ago

Ahmadre commented 5 years ago

Steps to Reproduce

  1. Create a PaginatedDataTable Widget. Insert anywhere (header, columns, rows) an AutoSizeText Widget

  2. Try to render/run your App

Code sample

SingleChildScrollView(
            child: PaginatedDataTable(
              header: AutoSizeText(
                  Localizations.of(context)
                      .trans('TABLE_HEADER'),
                  maxLines: 1,
                  style: TextStyle(
                      fontSize: 22, color: Colors.black.withOpacity(.7))),
              columns: _buildDataTableColumns(),
              source: _buildTableSource(),
              rowsPerPage: 10,
            ),
          ),

Error

════════ Exception caught by rendering library ═════════════════════════════════
The following assertion was thrown during performLayout():
LayoutBuilder does not support returning intrinsic dimensions.

Calculating the intrinsic dimensions would require running the layout callback speculatively, which might mutate the live render object tree.

Version

simc commented 5 years ago

Thanks, I'll take a look...

Ahmadre commented 4 years ago

any news @leisim ?

simc commented 4 years ago

@Ahmadre sorry, not yet :/