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

This commit is contained in:
Adam Barth 2016-03-14 12:24:58 -07:00
parent 9bc4deed1a
commit 89987fc040
3 changed files with 7 additions and 7 deletions

View File

@ -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')),

View File

@ -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,

View File

@ -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'))