Rename all the scrollable classes
Block -> BlockBody ScrollableBlock -> Block FixedHeightScrollable -> ScrollableWidgetList VariableHeightScrollable -> ScrollableMixedWidgetList BlockViewport -> MixedViewport
This commit is contained in:
@@ -54,7 +54,7 @@ class AddressBookApp extends App {
|
||||
showDialog(navigator, (navigator) {
|
||||
return new Dialog(
|
||||
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: emoticonKey, icon: "editor/insert_emoticon", placeholder: "Emotion"),
|
||||
]),
|
||||
@@ -88,7 +88,7 @@ class AddressBookApp extends App {
|
||||
|
||||
Widget buildBody(Navigator navigator) {
|
||||
return new Material(
|
||||
child: new ScrollableBlock([
|
||||
child: new Block([
|
||||
new AspectRatio(
|
||||
aspectRatio: 16.0 / 9.0,
|
||||
child: new Container(
|
||||
|
||||
@@ -324,7 +324,7 @@ class AddItemDialog extends StatefulComponent {
|
||||
}
|
||||
return new Dialog(
|
||||
title: new Text("What are you doing?"),
|
||||
content: new ScrollableBlock(menuItems),
|
||||
content: new Block(menuItems),
|
||||
onDismiss: navigator.pop,
|
||||
actions: [
|
||||
new FlatButton(
|
||||
|
||||
@@ -92,7 +92,7 @@ class MealFragment extends StatefulComponent {
|
||||
child: new ScrollableViewport(
|
||||
child: new Container(
|
||||
padding: const EdgeDims.all(20.0),
|
||||
child: new Block([
|
||||
child: new BlockBody([
|
||||
new Text(meal.displayDate),
|
||||
new Input(
|
||||
key: descriptionKey,
|
||||
|
||||
@@ -114,7 +114,7 @@ class MeasurementFragment extends StatefulComponent {
|
||||
child: new ScrollableViewport(
|
||||
child: new Container(
|
||||
padding: const EdgeDims.all(20.0),
|
||||
child: new Block([
|
||||
child: new BlockBody([
|
||||
new Text(measurement.displayDate),
|
||||
new Input(
|
||||
key: weightKey,
|
||||
|
||||
@@ -109,7 +109,7 @@ class SettingsFragment extends StatefulComponent {
|
||||
child: new ScrollableViewport(
|
||||
child: new Container(
|
||||
padding: const EdgeDims.symmetric(vertical: 20.0),
|
||||
child: new Block([
|
||||
child: new BlockBody([
|
||||
new DrawerItem(
|
||||
onPressed: () { _handleBackupChanged(!(userData.backupMode == BackupMode.enabled)); },
|
||||
children: [
|
||||
|
||||
@@ -98,7 +98,7 @@ class StockSettings extends StatefulComponent {
|
||||
child: new ScrollableViewport(
|
||||
child: new Container(
|
||||
padding: const EdgeDims.symmetric(vertical: 20.0),
|
||||
child: new Block([
|
||||
child: new BlockBody([
|
||||
new DrawerItem(
|
||||
icon: 'action/thumb_up',
|
||||
onPressed: () => _confirmOptimismChange(),
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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)
|
||||
)
|
||||
);
|
||||
|
||||
@@ -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();
|
||||
// });
|
||||
@@ -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
|
||||
|
||||
@@ -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) ]
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user