Commit cb620718 authored by Adam Barth's avatar Adam Barth

Merge pull request #2669 from abarth/two_level

[rename fixit] TwoLevelSublist left->leading, center->title
parents 9bc4deed 89987fc0
...@@ -15,7 +15,7 @@ class TwoLevelListDemo extends StatelessWidget { ...@@ -15,7 +15,7 @@ class TwoLevelListDemo extends StatelessWidget {
items: <Widget>[ items: <Widget>[
new TwoLevelListItem(title: new Text('Top')), new TwoLevelListItem(title: new Text('Top')),
new TwoLevelSublist( new TwoLevelSublist(
center: new Text('Sublist'), title: new Text('Sublist'),
children: <Widget>[ children: <Widget>[
new TwoLevelListItem(title: new Text('One')), new TwoLevelListItem(title: new Text('One')),
new TwoLevelListItem(title: new Text('Two')), new TwoLevelListItem(title: new Text('Two')),
......
...@@ -50,10 +50,10 @@ class TwoLevelListItem extends StatelessWidget { ...@@ -50,10 +50,10 @@ class TwoLevelListItem extends StatelessWidget {
} }
class TwoLevelSublist extends StatefulWidget { class TwoLevelSublist extends StatefulWidget {
TwoLevelSublist({ Key key, this.left, this.center, this.children }) : super(key: key); TwoLevelSublist({ Key key, this.leading, this.title, this.children }) : super(key: key);
final Widget left; final Widget leading;
final Widget center; final Widget title;
final List<Widget> children; final List<Widget> children;
_TwoLevelSublistState createState() => new _TwoLevelSublistState(); _TwoLevelSublistState createState() => new _TwoLevelSublistState();
...@@ -108,10 +108,10 @@ class _TwoLevelSublistState extends State<TwoLevelSublist> { ...@@ -108,10 +108,10 @@ class _TwoLevelSublistState extends State<TwoLevelSublist> {
children: <Widget>[ children: <Widget>[
new TwoLevelListItem( new TwoLevelListItem(
onTap: _handleOnTap, onTap: _handleOnTap,
leading: config.left, leading: config.leading,
title: new DefaultTextStyle( title: new DefaultTextStyle(
style: Theme.of(context).textTheme.subhead.copyWith(color: _headerColor.evaluate(_easeInAnimation)), style: Theme.of(context).textTheme.subhead.copyWith(color: _headerColor.evaluate(_easeInAnimation)),
child: config.center child: config.title
), ),
trailing: new RotationTransition( trailing: new RotationTransition(
turns: _iconTurns, turns: _iconTurns,
......
...@@ -22,7 +22,7 @@ void main() { ...@@ -22,7 +22,7 @@ void main() {
new TwoLevelListItem(title: new Text('Top'), key: topKey), new TwoLevelListItem(title: new Text('Top'), key: topKey),
new TwoLevelSublist( new TwoLevelSublist(
key: sublistKey, key: sublistKey,
center: new Text('Sublist'), title: new Text('Sublist'),
children: <Widget>[ children: <Widget>[
new TwoLevelListItem(title: new Text('0')), new TwoLevelListItem(title: new Text('0')),
new TwoLevelListItem(title: new Text('1')) new TwoLevelListItem(title: new Text('1'))
......
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