diff --git a/packages/syncfusion_flutter_datagrid/lib/src/datagrid_widget/sfdatagrid.dart b/packages/syncfusion_flutter_datagrid/lib/src/datagrid_widget/sfdatagrid.dart index 3c6848efe..a00c43685 100644 --- a/packages/syncfusion_flutter_datagrid/lib/src/datagrid_widget/sfdatagrid.dart +++ b/packages/syncfusion_flutter_datagrid/lib/src/datagrid_widget/sfdatagrid.dart @@ -128,7 +128,11 @@ typedef GroupChangedCallback = void Function(DataGridGroupChangedDetails group); /// constructor of each [DataGridRow] object. class DataGridRow { /// Creates [DataGridRow] for the [SfDataGrid]. - const DataGridRow({required List cells}) : _cells = cells; + DataGridRow({ + required List cells, + List? widgets, + }) : _cells = cells, + _widgets = widgets ?? []; /// The data for this row. /// @@ -136,11 +140,23 @@ class DataGridRow { /// [SfDataGrid]. final List _cells; + /// The data for this row. + /// + /// There must be exactly as many widgets as there are columns in the + /// [SfDataGrid]. + final List _widgets; + /// Returns the collection of [DataGridCell] which is created for /// [DataGridRow]. List getCells() { return _cells; } + + /// Returns the list of [Widget]s which is created for + /// [DataGridRow]. + List getWidgets() { + return _widgets; + } } /// The data for a cell of a [SfDataGrid].