Rename all the scrollable classes

Block -> BlockBody
ScrollableBlock -> Block
FixedHeightScrollable -> ScrollableWidgetList
VariableHeightScrollable -> ScrollableMixedWidgetList
BlockViewport -> MixedViewport
This commit is contained in:
Adam Barth
2015-08-21 14:13:03 -07:00
parent 546a3acf0e
commit 010589be9e
20 changed files with 53 additions and 61 deletions

View File

@@ -24,7 +24,7 @@ class CardCollectionApp extends App {
final TextStyle backgroundTextStyle =
typography.white.title.copyWith(textAlign: TextAlign.center);
BlockViewportLayoutState layoutState = new BlockViewportLayoutState();
MixedViewportLayoutState layoutState = new MixedViewportLayoutState();
List<CardModel> cardModels;
void initState() {
@@ -102,7 +102,7 @@ class CardCollectionApp extends App {
Widget cardCollection = new Container(
padding: const EdgeDims.symmetric(vertical: 12.0, horizontal: 8.0),
decoration: new BoxDecoration(backgroundColor: Theme.of(this).primarySwatch[50]),
child: new VariableHeightScrollable(
child: new ScrollableMixedWidgetList(
builder: builder,
token: cardModels.length,
layoutState: layoutState

View File

@@ -24,7 +24,7 @@ class EnsureVisibleApp extends App {
const TextStyle(color: colors.white, fontSize: 24.0, fontWeight: bold);
List<CardModel> cardModels;
BlockViewportLayoutState layoutState = new BlockViewportLayoutState();
MixedViewportLayoutState layoutState = new MixedViewportLayoutState();
CardModel selectedCardModel;
void initState() {
@@ -74,7 +74,7 @@ class EnsureVisibleApp extends App {
Widget cardCollection = new Container(
padding: const EdgeDims.symmetric(vertical: 12.0, horizontal: 8.0),
decoration: new BoxDecoration(backgroundColor: Theme.of(this).primarySwatch[50]),
child: new VariableHeightScrollable(
child: new ScrollableMixedWidgetList(
builder: builder,
token: cardModels.length,
layoutState: layoutState

View File

@@ -42,7 +42,7 @@ class HorizontalScrollingApp extends App {
child: new Container(
height: 50.0,
child: new Flex([
new ScrollableBlock(circles, scrollDirection: ScrollDirection.horizontal)
new Block(circles, scrollDirection: ScrollDirection.horizontal)
], justifyContent: FlexJustifyContent.end)
)
);

View File

@@ -6,9 +6,9 @@ import 'dart:math' as math;
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>[];
double offset = 0.0;
@@ -87,7 +87,7 @@ class BlockViewportApp extends App {
border: new Border.all(color: new Color(0xFF000000))
),
padding: new EdgeDims.all(16.0),
child: new BlockViewport(
child: new MixedViewport(
builder: builder,
startOffset: offset,
token: lengths.length,
@@ -124,7 +124,7 @@ class BlockViewportApp extends App {
}
void main() {
runApp(new BlockViewportApp());
runApp(new MixedViewportApp());
// scheduler.addPersistentFrameCallback((_) {
// SkyBinding.instance.debugDumpRenderTree();
// });

View File

@@ -71,7 +71,7 @@ class OverlayGeometryApp extends App {
const TextStyle(color: colors.white, fontSize: 18.0, fontWeight: bold);
List<CardModel> cardModels;
BlockViewportLayoutState layoutState = new BlockViewportLayoutState();
MixedViewportLayoutState layoutState = new MixedViewportLayoutState();
Map<MarkerType, Point> markers = new Map<MarkerType, Point>();
double markersScrollOffset;
ScrollListener scrollListener;
@@ -138,7 +138,7 @@ class OverlayGeometryApp extends App {
}
Widget build() {
Scrollable scrollable = new VariableHeightScrollable(
Scrollable scrollable = new ScrollableMixedWidgetList(
builder: builder,
token: cardModels.length,
layoutState: layoutState

View File

@@ -91,7 +91,7 @@ class ExampleApp extends App {
body: new MimicOverlay(
overlay: _overlay,
duration: const Duration(milliseconds: 500),
children: [ new ScrollableBlock(cards) ]
children: [ new Block(cards) ]
)
)
)