diff --git a/packages/flutter/lib/src/widgets/lazy_block.dart b/packages/flutter/lib/src/widgets/lazy_block.dart index bcde0a3158..10d449d0ba 100644 --- a/packages/flutter/lib/src/widgets/lazy_block.dart +++ b/packages/flutter/lib/src/widgets/lazy_block.dart @@ -201,6 +201,20 @@ class _LazyBlockState extends ScrollableState { } /// Signature used by [LazyBlockViewport] to report its interior and exterior dimensions. +/// +/// * The [contentExtent] is the interior dimension of the viewport (i.e., the +/// size of the thing that's being viewed through the viewport). +/// * The [containerExtent] is the exterior dimension of the viewport (i.e., +/// the amount of the thing inside the viewport that is visible from outside +/// the viewport). +/// * The [minScrollOffset] is the offset at which the starting edge of the +/// first item in the viewport is aligned with the starting edge of the +/// viewport. (As the scroll offset increases, items with larger indices are +/// revealed in the viewport.) Typically the min scroll offset is 0.0, but +/// because [LazyBlockViewport] uses dead reckoning, the min scroll offset +/// might not always be 0.0. For example, if an item that's offscreen changes +/// size, the visible items will retain their current scroll offsets even if +/// the distance to the starting edge of the first item changes. typedef void LazyBlockExtentsChangedCallback(double contentExtent, double containerExtent, double minScrollOffset); /// A viewport on an infinite list of variable height children. diff --git a/packages/flutter/lib/src/widgets/virtual_viewport.dart b/packages/flutter/lib/src/widgets/virtual_viewport.dart index 3f31ade0bc..76aa62f502 100644 --- a/packages/flutter/lib/src/widgets/virtual_viewport.dart +++ b/packages/flutter/lib/src/widgets/virtual_viewport.dart @@ -10,6 +10,13 @@ import 'framework.dart'; import 'package:flutter/rendering.dart'; +/// Signature for reporting the interior and exterior dimensions of a viewport. +/// +/// * The [contentExtent] is the interior dimension of the viewport (i.e., the +/// size of the thing that's being viewed through the viewport). +/// * The [containerExtent] is the exterior dimension of the viewport (i.e., +/// the amount of the thing inside the viewport that is visible from outside +/// the viewport). typedef void ExtentsChangedCallback(double contentExtent, double containerExtent); /// An abstract widget whose children are not all materialized. diff --git a/packages/flutter_sprites/lib/src/nine_slice_sprite.dart b/packages/flutter_sprites/lib/src/nine_slice_sprite.dart index cca9811483..57e7c024a8 100644 --- a/packages/flutter_sprites/lib/src/nine_slice_sprite.dart +++ b/packages/flutter_sprites/lib/src/nine_slice_sprite.dart @@ -81,7 +81,7 @@ class NineSliceSprite extends NodeWithSize with SpritePaint { List _vertices; List _textureCoordinates; List _colors; - List _indicies; + List _indices; @override void paint(Canvas canvas) { @@ -157,7 +157,7 @@ class NineSliceSprite extends NodeWithSize with SpritePaint { } // Build indices. - _indicies = []; + _indices = []; for (int y = 0; y < 3; y += 1) { for (int x = 0; x < 3; x += 1) { // Check if we should skip the middle rectangle. @@ -167,13 +167,13 @@ class NineSliceSprite extends NodeWithSize with SpritePaint { // Add a rectangle (two triangles). int index = y * 4 + x; - _indicies.add(index); - _indicies.add(index + 1); - _indicies.add(index + 4); + _indices.add(index); + _indices.add(index + 1); + _indices.add(index + 4); - _indicies.add(index + 1); - _indicies.add(index + 5); - _indicies.add(index + 4); + _indices.add(index + 1); + _indices.add(index + 5); + _indices.add(index + 4); } } } @@ -184,7 +184,7 @@ class NineSliceSprite extends NodeWithSize with SpritePaint { _textureCoordinates, _colors, TransferMode.modulate, - _indicies, + _indices, _cachedPaint ); }