Commit 010589be authored by Adam Barth's avatar Adam Barth

Rename all the scrollable classes

Block -> BlockBody
ScrollableBlock -> Block
FixedHeightScrollable -> ScrollableWidgetList
VariableHeightScrollable -> ScrollableMixedWidgetList
BlockViewport -> MixedViewport
parent 546a3acf
...@@ -54,7 +54,7 @@ class AddressBookApp extends App { ...@@ -54,7 +54,7 @@ class AddressBookApp extends App {
showDialog(navigator, (navigator) { showDialog(navigator, (navigator) {
return new Dialog( return new Dialog(
title: new Text("Describe your picture"), title: new Text("Describe your picture"),
content: new ScrollableBlock([ content: new Block([
new Field(inputKey: fillKey, icon: "editor/format_color_fill", placeholder: "Color"), new Field(inputKey: fillKey, icon: "editor/format_color_fill", placeholder: "Color"),
new Field(inputKey: emoticonKey, icon: "editor/insert_emoticon", placeholder: "Emotion"), new Field(inputKey: emoticonKey, icon: "editor/insert_emoticon", placeholder: "Emotion"),
]), ]),
...@@ -88,7 +88,7 @@ class AddressBookApp extends App { ...@@ -88,7 +88,7 @@ class AddressBookApp extends App {
Widget buildBody(Navigator navigator) { Widget buildBody(Navigator navigator) {
return new Material( return new Material(
child: new ScrollableBlock([ child: new Block([
new AspectRatio( new AspectRatio(
aspectRatio: 16.0 / 9.0, aspectRatio: 16.0 / 9.0,
child: new Container( child: new Container(
......
...@@ -324,7 +324,7 @@ class AddItemDialog extends StatefulComponent { ...@@ -324,7 +324,7 @@ class AddItemDialog extends StatefulComponent {
} }
return new Dialog( return new Dialog(
title: new Text("What are you doing?"), title: new Text("What are you doing?"),
content: new ScrollableBlock(menuItems), content: new Block(menuItems),
onDismiss: navigator.pop, onDismiss: navigator.pop,
actions: [ actions: [
new FlatButton( new FlatButton(
......
...@@ -92,7 +92,7 @@ class MealFragment extends StatefulComponent { ...@@ -92,7 +92,7 @@ class MealFragment extends StatefulComponent {
child: new ScrollableViewport( child: new ScrollableViewport(
child: new Container( child: new Container(
padding: const EdgeDims.all(20.0), padding: const EdgeDims.all(20.0),
child: new Block([ child: new BlockBody([
new Text(meal.displayDate), new Text(meal.displayDate),
new Input( new Input(
key: descriptionKey, key: descriptionKey,
......
...@@ -114,7 +114,7 @@ class MeasurementFragment extends StatefulComponent { ...@@ -114,7 +114,7 @@ class MeasurementFragment extends StatefulComponent {
child: new ScrollableViewport( child: new ScrollableViewport(
child: new Container( child: new Container(
padding: const EdgeDims.all(20.0), padding: const EdgeDims.all(20.0),
child: new Block([ child: new BlockBody([
new Text(measurement.displayDate), new Text(measurement.displayDate),
new Input( new Input(
key: weightKey, key: weightKey,
......
...@@ -109,7 +109,7 @@ class SettingsFragment extends StatefulComponent { ...@@ -109,7 +109,7 @@ class SettingsFragment extends StatefulComponent {
child: new ScrollableViewport( child: new ScrollableViewport(
child: new Container( child: new Container(
padding: const EdgeDims.symmetric(vertical: 20.0), padding: const EdgeDims.symmetric(vertical: 20.0),
child: new Block([ child: new BlockBody([
new DrawerItem( new DrawerItem(
onPressed: () { _handleBackupChanged(!(userData.backupMode == BackupMode.enabled)); }, onPressed: () { _handleBackupChanged(!(userData.backupMode == BackupMode.enabled)); },
children: [ children: [
......
...@@ -98,7 +98,7 @@ class StockSettings extends StatefulComponent { ...@@ -98,7 +98,7 @@ class StockSettings extends StatefulComponent {
child: new ScrollableViewport( child: new ScrollableViewport(
child: new Container( child: new Container(
padding: const EdgeDims.symmetric(vertical: 20.0), padding: const EdgeDims.symmetric(vertical: 20.0),
child: new Block([ child: new BlockBody([
new DrawerItem( new DrawerItem(
icon: 'action/thumb_up', icon: 'action/thumb_up',
onPressed: () => _confirmOptimismChange(), onPressed: () => _confirmOptimismChange(),
......
...@@ -24,7 +24,7 @@ class CardCollectionApp extends App { ...@@ -24,7 +24,7 @@ class CardCollectionApp extends App {
final TextStyle backgroundTextStyle = final TextStyle backgroundTextStyle =
typography.white.title.copyWith(textAlign: TextAlign.center); typography.white.title.copyWith(textAlign: TextAlign.center);
BlockViewportLayoutState layoutState = new BlockViewportLayoutState(); MixedViewportLayoutState layoutState = new MixedViewportLayoutState();
List<CardModel> cardModels; List<CardModel> cardModels;
void initState() { void initState() {
...@@ -102,7 +102,7 @@ class CardCollectionApp extends App { ...@@ -102,7 +102,7 @@ class CardCollectionApp extends App {
Widget cardCollection = new Container( Widget cardCollection = new Container(
padding: const EdgeDims.symmetric(vertical: 12.0, horizontal: 8.0), padding: const EdgeDims.symmetric(vertical: 12.0, horizontal: 8.0),
decoration: new BoxDecoration(backgroundColor: Theme.of(this).primarySwatch[50]), decoration: new BoxDecoration(backgroundColor: Theme.of(this).primarySwatch[50]),
child: new VariableHeightScrollable( child: new ScrollableMixedWidgetList(
builder: builder, builder: builder,
token: cardModels.length, token: cardModels.length,
layoutState: layoutState layoutState: layoutState
......
...@@ -24,7 +24,7 @@ class EnsureVisibleApp extends App { ...@@ -24,7 +24,7 @@ class EnsureVisibleApp extends App {
const TextStyle(color: colors.white, fontSize: 24.0, fontWeight: bold); const TextStyle(color: colors.white, fontSize: 24.0, fontWeight: bold);
List<CardModel> cardModels; List<CardModel> cardModels;
BlockViewportLayoutState layoutState = new BlockViewportLayoutState(); MixedViewportLayoutState layoutState = new MixedViewportLayoutState();
CardModel selectedCardModel; CardModel selectedCardModel;
void initState() { void initState() {
...@@ -74,7 +74,7 @@ class EnsureVisibleApp extends App { ...@@ -74,7 +74,7 @@ class EnsureVisibleApp extends App {
Widget cardCollection = new Container( Widget cardCollection = new Container(
padding: const EdgeDims.symmetric(vertical: 12.0, horizontal: 8.0), padding: const EdgeDims.symmetric(vertical: 12.0, horizontal: 8.0),
decoration: new BoxDecoration(backgroundColor: Theme.of(this).primarySwatch[50]), decoration: new BoxDecoration(backgroundColor: Theme.of(this).primarySwatch[50]),
child: new VariableHeightScrollable( child: new ScrollableMixedWidgetList(
builder: builder, builder: builder,
token: cardModels.length, token: cardModels.length,
layoutState: layoutState layoutState: layoutState
......
...@@ -42,7 +42,7 @@ class HorizontalScrollingApp extends App { ...@@ -42,7 +42,7 @@ class HorizontalScrollingApp extends App {
child: new Container( child: new Container(
height: 50.0, height: 50.0,
child: new Flex([ child: new Flex([
new ScrollableBlock(circles, scrollDirection: ScrollDirection.horizontal) new Block(circles, scrollDirection: ScrollDirection.horizontal)
], justifyContent: FlexJustifyContent.end) ], justifyContent: FlexJustifyContent.end)
) )
); );
......
...@@ -6,9 +6,9 @@ import 'dart:math' as math; ...@@ -6,9 +6,9 @@ import 'dart:math' as math;
import 'package:sky/widgets.dart'; import 'package:sky/widgets.dart';
class BlockViewportApp extends App { class MixedViewportApp extends App {
BlockViewportLayoutState layoutState = new BlockViewportLayoutState(); MixedViewportLayoutState layoutState = new MixedViewportLayoutState();
List<double> lengths = <double>[]; List<double> lengths = <double>[];
double offset = 0.0; double offset = 0.0;
...@@ -87,7 +87,7 @@ class BlockViewportApp extends App { ...@@ -87,7 +87,7 @@ class BlockViewportApp extends App {
border: new Border.all(color: new Color(0xFF000000)) border: new Border.all(color: new Color(0xFF000000))
), ),
padding: new EdgeDims.all(16.0), padding: new EdgeDims.all(16.0),
child: new BlockViewport( child: new MixedViewport(
builder: builder, builder: builder,
startOffset: offset, startOffset: offset,
token: lengths.length, token: lengths.length,
...@@ -124,7 +124,7 @@ class BlockViewportApp extends App { ...@@ -124,7 +124,7 @@ class BlockViewportApp extends App {
} }
void main() { void main() {
runApp(new BlockViewportApp()); runApp(new MixedViewportApp());
// scheduler.addPersistentFrameCallback((_) { // scheduler.addPersistentFrameCallback((_) {
// SkyBinding.instance.debugDumpRenderTree(); // SkyBinding.instance.debugDumpRenderTree();
// }); // });
......
...@@ -71,7 +71,7 @@ class OverlayGeometryApp extends App { ...@@ -71,7 +71,7 @@ class OverlayGeometryApp extends App {
const TextStyle(color: colors.white, fontSize: 18.0, fontWeight: bold); const TextStyle(color: colors.white, fontSize: 18.0, fontWeight: bold);
List<CardModel> cardModels; List<CardModel> cardModels;
BlockViewportLayoutState layoutState = new BlockViewportLayoutState(); MixedViewportLayoutState layoutState = new MixedViewportLayoutState();
Map<MarkerType, Point> markers = new Map<MarkerType, Point>(); Map<MarkerType, Point> markers = new Map<MarkerType, Point>();
double markersScrollOffset; double markersScrollOffset;
ScrollListener scrollListener; ScrollListener scrollListener;
...@@ -138,7 +138,7 @@ class OverlayGeometryApp extends App { ...@@ -138,7 +138,7 @@ class OverlayGeometryApp extends App {
} }
Widget build() { Widget build() {
Scrollable scrollable = new VariableHeightScrollable( Scrollable scrollable = new ScrollableMixedWidgetList(
builder: builder, builder: builder,
token: cardModels.length, token: cardModels.length,
layoutState: layoutState layoutState: layoutState
......
...@@ -91,7 +91,7 @@ class ExampleApp extends App { ...@@ -91,7 +91,7 @@ class ExampleApp extends App {
body: new MimicOverlay( body: new MimicOverlay(
overlay: _overlay, overlay: _overlay,
duration: const Duration(milliseconds: 500), duration: const Duration(milliseconds: 500),
children: [ new ScrollableBlock(cards) ] children: [ new Block(cards) ]
) )
) )
) )
......
...@@ -7,7 +7,6 @@ ...@@ -7,7 +7,6 @@
export 'widgets/animated_component.dart'; export 'widgets/animated_component.dart';
export 'widgets/animated_container.dart'; export 'widgets/animated_container.dart';
export 'widgets/basic.dart'; export 'widgets/basic.dart';
export 'widgets/block_viewport.dart';
export 'widgets/button_base.dart'; export 'widgets/button_base.dart';
export 'widgets/card.dart'; export 'widgets/card.dart';
export 'widgets/checkbox.dart'; export 'widgets/checkbox.dart';
...@@ -30,6 +29,7 @@ export 'widgets/material.dart'; ...@@ -30,6 +29,7 @@ export 'widgets/material.dart';
export 'widgets/material_button.dart'; export 'widgets/material_button.dart';
export 'widgets/mimic.dart'; export 'widgets/mimic.dart';
export 'widgets/mimic_overlay.dart'; export 'widgets/mimic_overlay.dart';
export 'widgets/mixed_viewport.dart';
export 'widgets/modal_overlay.dart'; export 'widgets/modal_overlay.dart';
export 'widgets/navigator.dart'; export 'widgets/navigator.dart';
export 'widgets/popup_menu.dart'; export 'widgets/popup_menu.dart';
......
...@@ -407,8 +407,8 @@ class Container extends Component { ...@@ -407,8 +407,8 @@ class Container extends Component {
// LAYOUT NODES // LAYOUT NODES
class Block extends MultiChildRenderObjectWrapper { class BlockBody extends MultiChildRenderObjectWrapper {
Block(List<Widget> children, { BlockBody(List<Widget> children, {
Key key, Key key,
this.direction: BlockDirection.vertical this.direction: BlockDirection.vertical
}) : super(key: key, children: children); }) : super(key: key, children: children);
......
...@@ -99,7 +99,7 @@ class Dialog extends Component { ...@@ -99,7 +99,7 @@ class Dialog extends Component {
level: 4, level: 4,
color: _color, color: _color,
child: new ShrinkWrapWidth( child: new ShrinkWrapWidth(
child: new ScrollableBlock(dialogBody) child: new Block(dialogBody)
) )
) )
) )
......
...@@ -105,7 +105,7 @@ class Drawer extends StatefulComponent { ...@@ -105,7 +105,7 @@ class Drawer extends StatefulComponent {
backgroundColor: Theme.of(this).canvasColor, backgroundColor: Theme.of(this).canvasColor,
boxShadow: shadows[level]), boxShadow: shadows[level]),
width: _kWidth, width: _kWidth,
child: new ScrollableBlock(children) child: new Block(children)
) )
); );
......
...@@ -24,8 +24,8 @@ class _Key { ...@@ -24,8 +24,8 @@ class _Key {
typedef void LayoutChangedCallback(); typedef void LayoutChangedCallback();
class BlockViewportLayoutState { class MixedViewportLayoutState {
BlockViewportLayoutState() MixedViewportLayoutState()
: _childOffsets = <double>[0.0], : _childOffsets = <double>[0.0],
_firstVisibleChildIndex = 0, _firstVisibleChildIndex = 0,
_visibleChildCount = 0, _visibleChildCount = 0,
...@@ -77,8 +77,8 @@ class BlockViewportLayoutState { ...@@ -77,8 +77,8 @@ class BlockViewportLayoutState {
} }
} }
class BlockViewport extends RenderObjectWrapper { class MixedViewport extends RenderObjectWrapper {
BlockViewport({ this.builder, this.startOffset, this.token, this.layoutState, Key key }) MixedViewport({ this.builder, this.startOffset, this.token, this.layoutState, Key key })
: super(key: key) { : super(key: key) {
assert(this.layoutState != null); assert(this.layoutState != null);
} }
...@@ -86,7 +86,7 @@ class BlockViewport extends RenderObjectWrapper { ...@@ -86,7 +86,7 @@ class BlockViewport extends RenderObjectWrapper {
IndexedBuilder builder; IndexedBuilder builder;
double startOffset; double startOffset;
Object token; Object token;
BlockViewportLayoutState layoutState; MixedViewportLayoutState layoutState;
RenderBlockViewport get renderObject => super.renderObject; RenderBlockViewport get renderObject => super.renderObject;
RenderBlockViewport createNode() => new RenderBlockViewport(); RenderBlockViewport createNode() => new RenderBlockViewport();
...@@ -144,7 +144,7 @@ class BlockViewport extends RenderObjectWrapper { ...@@ -144,7 +144,7 @@ class BlockViewport extends RenderObjectWrapper {
return right; return right;
} }
bool retainStatefulNodeIfPossible(BlockViewport newNode) { bool retainStatefulNodeIfPossible(MixedViewport newNode) {
assert(layoutState == newNode.layoutState); assert(layoutState == newNode.layoutState);
retainStatefulRenderObjectWrapper(newNode); retainStatefulRenderObjectWrapper(newNode);
if (startOffset != newNode.startOffset) { if (startOffset != newNode.startOffset) {
...@@ -162,7 +162,7 @@ class BlockViewport extends RenderObjectWrapper { ...@@ -162,7 +162,7 @@ class BlockViewport extends RenderObjectWrapper {
return true; return true;
} }
void syncRenderObject(BlockViewport old) { void syncRenderObject(MixedViewport old) {
super.syncRenderObject(old); super.syncRenderObject(old);
if (layoutState._dirty || !layoutState.isValid) { if (layoutState._dirty || !layoutState.isValid) {
renderObject.markNeedsLayout(); renderObject.markNeedsLayout();
......
...@@ -142,7 +142,7 @@ class PopupMenu extends StatefulComponent { ...@@ -142,7 +142,7 @@ class PopupMenu extends StatefulComponent {
horizontal: _kMenuHorizontalPadding, horizontal: _kMenuHorizontalPadding,
vertical: _kMenuVerticalPadding vertical: _kMenuVerticalPadding
), ),
child: new Block(children) child: new BlockBody(children)
) )
) )
) )
......
...@@ -16,11 +16,11 @@ import 'package:sky/rendering/box.dart'; ...@@ -16,11 +16,11 @@ import 'package:sky/rendering/box.dart';
import 'package:sky/rendering/viewport.dart'; import 'package:sky/rendering/viewport.dart';
import 'package:sky/theme/view_configuration.dart' as config; import 'package:sky/theme/view_configuration.dart' as config;
import 'package:sky/widgets/basic.dart'; import 'package:sky/widgets/basic.dart';
import 'package:sky/widgets/block_viewport.dart';
import 'package:sky/widgets/scrollable.dart';
import 'package:sky/widgets/framework.dart'; import 'package:sky/widgets/framework.dart';
import 'package:sky/widgets/mixed_viewport.dart';
import 'package:sky/widgets/scrollable.dart';
export 'package:sky/widgets/block_viewport.dart' show BlockViewportLayoutState; export 'package:sky/widgets/mixed_viewport.dart' show MixedViewportLayoutState;
// The GestureEvent velocity properties are pixels/second, config min,max limits are pixels/ms // The GestureEvent velocity properties are pixels/second, config min,max limits are pixels/ms
...@@ -314,11 +314,11 @@ class ScrollableViewport extends Scrollable { ...@@ -314,11 +314,11 @@ class ScrollableViewport extends Scrollable {
} }
} }
/// A mashup of [ScrollableViewport] and [Block]. Useful when you have a small, /// A mashup of [ScrollableViewport] and [BlockBody]. Useful when you have a small,
/// fixed number of children that you wish to arrange in a block layout and that /// fixed number of children that you wish to arrange in a block layout and that
/// might exceed the height of its container (and therefore need to scroll). /// might exceed the height of its container (and therefore need to scroll).
class ScrollableBlock extends Component { class Block extends Component {
ScrollableBlock(this.children, { Block(this.children, {
Key key, Key key,
this.scrollDirection: ScrollDirection.vertical this.scrollDirection: ScrollDirection.vertical
}) : super(key: key); }) : super(key: key);
...@@ -335,7 +335,7 @@ class ScrollableBlock extends Component { ...@@ -335,7 +335,7 @@ class ScrollableBlock extends Component {
Widget build() { Widget build() {
return new ScrollableViewport( return new ScrollableViewport(
scrollDirection: scrollDirection, scrollDirection: scrollDirection,
child: new Block(children, direction: _direction) child: new BlockBody(children, direction: _direction)
); );
} }
} }
...@@ -345,9 +345,9 @@ class ScrollableBlock extends Component { ...@@ -345,9 +345,9 @@ class ScrollableBlock extends Component {
/// ScrollDirection.vertical itemExtent is the height of each item. Use this /// ScrollDirection.vertical itemExtent is the height of each item. Use this
/// widget when you have a large number of children or when you are concerned /// widget when you have a large number of children or when you are concerned
// about offscreen widgets consuming resources. // about offscreen widgets consuming resources.
abstract class FixedHeightScrollable extends Scrollable { abstract class ScrollableWidgetList extends Scrollable {
FixedHeightScrollable({ ScrollableWidgetList({
Key key, Key key,
ScrollDirection scrollDirection: ScrollDirection.vertical, ScrollDirection scrollDirection: ScrollDirection.vertical,
this.itemExtent, this.itemExtent,
...@@ -360,12 +360,12 @@ abstract class FixedHeightScrollable extends Scrollable { ...@@ -360,12 +360,12 @@ abstract class FixedHeightScrollable extends Scrollable {
double itemExtent; double itemExtent;
Size containerSize = Size.zero; Size containerSize = Size.zero;
/// Subclasses must implement `get itemCount` to tell FixedHeightScrollable /// Subclasses must implement `get itemCount` to tell ScrollableWidgetList
/// how many items there are in the list. /// how many items there are in the list.
int get itemCount; int get itemCount;
int _previousItemCount; int _previousItemCount;
void syncFields(FixedHeightScrollable source) { void syncFields(ScrollableWidgetList source) {
bool scrollBehaviorUpdateNeeded = bool scrollBehaviorUpdateNeeded =
padding != source.padding || padding != source.padding ||
itemExtent != source.itemExtent || itemExtent != source.itemExtent ||
...@@ -478,7 +478,7 @@ abstract class FixedHeightScrollable extends Scrollable { ...@@ -478,7 +478,7 @@ abstract class FixedHeightScrollable extends Scrollable {
: BlockDirection.horizontal; : BlockDirection.horizontal;
// TODO(ianh): Refactor this so that it does the building in the // TODO(ianh): Refactor this so that it does the building in the
// same frame as the size observing, similar to BlockViewport, but // same frame as the size observing, similar to MixedViewport, but
// keeping the fixed-height optimisations. // keeping the fixed-height optimisations.
return new SizeObserver( return new SizeObserver(
callback: _handleSizeChanged, callback: _handleSizeChanged,
...@@ -487,7 +487,7 @@ abstract class FixedHeightScrollable extends Scrollable { ...@@ -487,7 +487,7 @@ abstract class FixedHeightScrollable extends Scrollable {
scrollOffset: viewportOffset, scrollOffset: viewportOffset,
child: new Container( child: new Container(
padding: _crossAxisPadding, padding: _crossAxisPadding,
child: new Block(items, direction: blockDirection) child: new BlockBody(items, direction: blockDirection)
) )
) )
); );
...@@ -499,10 +499,10 @@ abstract class FixedHeightScrollable extends Scrollable { ...@@ -499,10 +499,10 @@ abstract class FixedHeightScrollable extends Scrollable {
typedef Widget ItemBuilder<T>(T item); typedef Widget ItemBuilder<T>(T item);
/// A wrapper around [FixedHeightScrollable] that helps you translate a list of /// A wrapper around [ScrollableWidgetList] that helps you translate a list of
/// model objects into a scrollable list of widgets. Assumes all the widgets /// model objects into a scrollable list of widgets. Assumes all the widgets
/// have the same height. /// have the same height.
class ScrollableList<T> extends FixedHeightScrollable { class ScrollableList<T> extends ScrollableWidgetList {
ScrollableList({ ScrollableList({
Key key, Key key,
ScrollDirection scrollDirection: ScrollDirection.vertical, ScrollDirection scrollDirection: ScrollDirection.vertical,
...@@ -588,11 +588,11 @@ class PageableList<T> extends ScrollableList<T> { ...@@ -588,11 +588,11 @@ class PageableList<T> extends ScrollableList<T> {
} }
/// A general scrollable list for a large number of children that might not all /// A general scrollable list for a large number of children that might not all
/// have the same height. Prefer [FixedHeightScrollable] when all the children /// have the same height. Prefer [ScrollableWidgetList] when all the children
/// have the same height because it can use that property to be more efficient. /// have the same height because it can use that property to be more efficient.
/// Prefer [ScrollableViewport] with a single child. /// Prefer [ScrollableViewport] with a single child.
class VariableHeightScrollable extends Scrollable { class ScrollableMixedWidgetList extends Scrollable {
VariableHeightScrollable({ ScrollableMixedWidgetList({
Key key, Key key,
this.builder, this.builder,
this.token, this.token,
...@@ -601,7 +601,7 @@ class VariableHeightScrollable extends Scrollable { ...@@ -601,7 +601,7 @@ class VariableHeightScrollable extends Scrollable {
IndexedBuilder builder; IndexedBuilder builder;
Object token; Object token;
BlockViewportLayoutState layoutState; MixedViewportLayoutState layoutState;
// When the token changes the scrollable's contents may have // When the token changes the scrollable's contents may have
// changed. Remember as much so that after the new contents // changed. Remember as much so that after the new contents
...@@ -624,7 +624,7 @@ class VariableHeightScrollable extends Scrollable { ...@@ -624,7 +624,7 @@ class VariableHeightScrollable extends Scrollable {
super.didUnmount(); super.didUnmount();
} }
void syncFields(VariableHeightScrollable source) { void syncFields(ScrollableMixedWidgetList source) {
builder = source.builder; builder = source.builder;
if (token != source.token) if (token != source.token)
_contentsChanged = true; _contentsChanged = true;
...@@ -661,7 +661,7 @@ class VariableHeightScrollable extends Scrollable { ...@@ -661,7 +661,7 @@ class VariableHeightScrollable extends Scrollable {
Widget buildContent() { Widget buildContent() {
return new SizeObserver( return new SizeObserver(
callback: _handleSizeChanged, callback: _handleSizeChanged,
child: new BlockViewport( child: new MixedViewport(
builder: builder, builder: builder,
layoutState: layoutState, layoutState: layoutState,
startOffset: scrollOffset, startOffset: scrollOffset,
......
...@@ -59,14 +59,6 @@ Layout models ...@@ -59,14 +59,6 @@ Layout models
`right` and `left` properties to non-null values will force the child to `right` and `left` properties to non-null values will force the child to
have a particular width. have a particular width.
- `Block` Layout a list of child widgets in a vertical line. Each child's width
is set to the widget of the block, and each child is positioned directly
below the previous child. The block's height is set to the total height of
all of its children. A block can be used only in locations that offer an
unbounded amount of vertical space (e.g., inside a `Viewport`). Rather than
using `Block` directly, most client should use `ScrollableBlock`, which
combines `Block` with `Viewport` and scrolling physics.
Positioning and sizing Positioning and sizing
---------------------- ----------------------
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment