Visitar URL original
Remove 'must not be null' comments from painting and rendering libraries. by gspencergoog · Pull Request #134993 · flutter/flutter · GitHub
Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Fix instances of 'cannot be null'
  • Loading branch information
gspencergoog committed Sep 19, 2023
commit 96368607fab04157c71de4050469fa457fc0108c
2 changes: 0 additions & 2 deletions packages/flutter/lib/src/painting/text_painter.dart
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,6 @@ enum TextOverflow {
/// Placeholders specify an empty space in the text layout, which is used
/// to later render arbitrary inline widgets into defined by a [WidgetSpan].
///
/// The [size] and [alignment] properties are required and cannot be null.
///
/// See also:
///
/// * [WidgetSpan], a subclass of [InlineSpan] and [PlaceholderSpan] that
Expand Down
2 changes: 1 addition & 1 deletion packages/flutter/lib/src/rendering/editable.dart
Original file line number Diff line number Diff line change
Expand Up @@ -560,7 +560,7 @@ class RenderEditable extends RenderBox with RelayoutWhenSystemFontsChangeMixin,

/// Character used for obscuring text if [obscureText] is true.
///
/// Cannot be null, and must have a length of exactly one.
/// Must have a length of exactly one.
String get obscuringCharacter => _obscuringCharacter;
String _obscuringCharacter;
set obscuringCharacter(String value) {
Expand Down
2 changes: 0 additions & 2 deletions packages/flutter/lib/src/rendering/layer.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2798,8 +2798,6 @@ class FollowerLayer extends ContainerLayer {
/// if [opaque] is true and the layer's annotation is added.
class AnnotatedRegionLayer<T extends Object> extends ContainerLayer {
/// Creates a new layer that annotates its children with [value].
///
/// The [value] provided cannot be null.
AnnotatedRegionLayer(
this.value, {
this.size,
Expand Down
3 changes: 0 additions & 3 deletions packages/flutter/lib/src/rendering/table_border.dart
Original file line number Diff line number Diff line change
Expand Up @@ -204,9 +204,6 @@ class TableBorder {
required Iterable<double> rows,
required Iterable<double> columns,
}) {
// properties can't be null

// arguments can't be null
assert(rows.isEmpty || (rows.first >= 0.0 && rows.last <= rect.height));
assert(columns.isEmpty || (columns.first >= 0.0 && columns.last <= rect.width));

Expand Down
1 change: 0 additions & 1 deletion packages/flutter/lib/src/rendering/viewport.dart
Original file line number Diff line number Diff line change
Expand Up @@ -1138,7 +1138,6 @@ abstract class RenderViewportBase<ParentDataClass extends ContainerParentDataMix
/// in the viewport after it has been revealed. See [RevealedOffset.rect]
/// for a full definition of this [Rect].
///
/// The parameters `viewport` and `offset` are required and cannot be null.
/// If `descendant` is null, this is a no-op and `rect` is returned.
///
/// If both `descendant` and `rect` are null, null is returned because there is
Expand Down