Commit 89987fc0 authored by Adam Barth's avatar Adam Barth

[rename fixit] TwoLevelSublist left->leading, center->title

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