Make DevToolsTable.rowItemExtent non-nullable (#8868)
diff --git a/packages/devtools_app/lib/src/app.dart b/packages/devtools_app/lib/src/app.dart index c09266d..2147c84 100644 --- a/packages/devtools_app/lib/src/app.dart +++ b/packages/devtools_app/lib/src/app.dart
@@ -523,7 +523,7 @@ /// widgets depending on this controller can access it by calling /// `Provider<C>.of(context)`. /// - /// If [createController] and [controller] are both null, [screen] will be + /// If [createController] and `controller` are both null, [screen] will be /// responsible for creating and maintaining its own controller. /// /// In the controller initialization, if logic requires a connected [VmService]
diff --git a/packages/devtools_app/lib/src/shared/table/table.dart b/packages/devtools_app/lib/src/shared/table/table.dart index 68dfe44..0a7bd9d 100644 --- a/packages/devtools_app/lib/src/shared/table/table.dart +++ b/packages/devtools_app/lib/src/shared/table/table.dart
@@ -83,7 +83,7 @@ this.startScrolledAtBottom = false, this.preserveVerticalScrollPosition = false, this.activeSearchMatchNotifier, - this.rowItemExtent, + required this.rowItemExtent, this.tallHeaders = false, this.headerColor, this.fillWithEmptyRows = false, @@ -95,7 +95,7 @@ final bool startScrolledAtBottom; final List<double> columnWidths; final IndexedScrollableWidgetBuilder rowBuilder; - final double? rowItemExtent; + final double rowItemExtent; final FocusNode? focusNode; final TableKeyEventHandler? handleKeyEvent; final ValueNotifier<Selection<T?>>? selectionNotifier; @@ -347,7 +347,7 @@ } double _pinnedDataHeight(BoxConstraints tableConstraints) => min( - widget.rowItemExtent! * pinnedData.length, + widget.rowItemExtent * pinnedData.length, tableConstraints.maxHeight / 2, ); @@ -371,7 +371,7 @@ _pinnedDataHeight(tableConstraints) + ThickDivider.thickDividerHeight; } - return max(_data.length, maxHeight ~/ widget.rowItemExtent!); + return max(_data.length, maxHeight ~/ widget.rowItemExtent); } Widget _buildItem(BuildContext context, int index, {bool isPinned = false}) {