Commit 1b9939af authored by Luke's avatar Luke Committed by Ian Hickson

Rename DestinationLabel on BottomNavigationBar (#7281)

* rename DestinationLabel and labels properties to BottomNavigationBarItem and items

* update/fix comments

* grammatical changes

* add myself to AUTHORS
parent 3e3d2192
......@@ -12,3 +12,4 @@ Günter Zöchbauer <guenter@gzoechbauer.com>
Raju Bitter <rajubitter@gmail.com>
Michael Beckler <mcbeckler@gmail.com>
Alexandre Ardhuin <alexandre.ardhuin@gmail.com>
Luke Freeman <luke@goposse.com>
......@@ -12,7 +12,7 @@ class NavigationIconView {
TickerProvider vsync,
}) : _icon = icon,
_color = color,
destinationLabel = new DestinationLabel(
item = new BottomNavigationBarItem(
icon: icon,
title: title,
backgroundColor: color,
......@@ -29,7 +29,7 @@ class NavigationIconView {
final Widget _icon;
final Color _color;
final DestinationLabel destinationLabel;
final BottomNavigationBarItem item;
final AnimationController controller;
CurvedAnimation _animation;
......@@ -165,8 +165,8 @@ class _BottomNavigationDemoState extends State<BottomNavigationDemo>
@override
Widget build(BuildContext context) {
final BottomNavigationBar botNavBar = new BottomNavigationBar(
labels: _navigationViews
.map((NavigationIconView navigationView) => navigationView.destinationLabel)
items: _navigationViews
.map((NavigationIconView navigationView) => navigationView.item)
.toList(),
currentIndex: _currentIndex,
type: _type,
......
......@@ -12,12 +12,12 @@ void main() {
await tester.pumpWidget(
new Scaffold(
bottomNavigationBar: new BottomNavigationBar(
labels: <DestinationLabel>[
new DestinationLabel(
items: <BottomNavigationBarItem>[
new BottomNavigationBarItem(
icon: new Icon(Icons.ac_unit),
title: new Text('AC')
),
new DestinationLabel(
new BottomNavigationBarItem(
icon: new Icon(Icons.access_alarm),
title: new Text('Alarm')
)
......@@ -38,12 +38,12 @@ void main() {
await tester.pumpWidget(
new Scaffold(
bottomNavigationBar: new BottomNavigationBar(
labels: <DestinationLabel>[
new DestinationLabel(
items: <BottomNavigationBarItem>[
new BottomNavigationBarItem(
icon: new Icon(Icons.ac_unit),
title: new Text('AC')
),
new DestinationLabel(
new BottomNavigationBarItem(
icon: new Icon(Icons.access_alarm),
title: new Text('Alarm')
)
......@@ -63,12 +63,12 @@ void main() {
new Scaffold(
bottomNavigationBar: new BottomNavigationBar(
type: BottomNavigationBarType.shifting,
labels: <DestinationLabel>[
new DestinationLabel(
items: <BottomNavigationBarItem>[
new BottomNavigationBarItem(
icon: new Icon(Icons.ac_unit),
title: new Text('AC')
),
new DestinationLabel(
new BottomNavigationBarItem(
icon: new Icon(Icons.access_alarm),
title: new Text('Alarm')
)
......@@ -87,12 +87,12 @@ void main() {
bottomNavigationBar: new BottomNavigationBar(
currentIndex: 1,
type: BottomNavigationBarType.shifting,
labels: <DestinationLabel>[
new DestinationLabel(
items: <BottomNavigationBarItem>[
new BottomNavigationBarItem(
icon: new Icon(Icons.ac_unit),
title: new Text('AC')
),
new DestinationLabel(
new BottomNavigationBarItem(
icon: new Icon(Icons.access_alarm),
title: new Text('Alarm')
)
......@@ -114,20 +114,20 @@ void main() {
new Scaffold(
bottomNavigationBar: new BottomNavigationBar(
type: BottomNavigationBarType.shifting,
labels: <DestinationLabel>[
new DestinationLabel(
items: <BottomNavigationBarItem>[
new BottomNavigationBarItem(
icon: new Icon(Icons.ac_unit),
title: new Text('AC')
),
new DestinationLabel(
new BottomNavigationBarItem(
icon: new Icon(Icons.access_alarm),
title: new Text('Alarm')
),
new DestinationLabel(
new BottomNavigationBarItem(
icon: new Icon(Icons.access_time),
title: new Text('Time')
),
new DestinationLabel(
new BottomNavigationBarItem(
icon: new Icon(Icons.add),
title: new Text('Add')
)
......@@ -174,20 +174,20 @@ void main() {
child: new Scaffold(
bottomNavigationBar: new BottomNavigationBar(
type: BottomNavigationBarType.shifting,
labels: <DestinationLabel>[
new DestinationLabel(
items: <BottomNavigationBarItem>[
new BottomNavigationBarItem(
icon: new Icon(Icons.ac_unit),
title: new Text('AC')
),
new DestinationLabel(
new BottomNavigationBarItem(
icon: new Icon(Icons.access_alarm),
title: new Text('Alarm')
),
new DestinationLabel(
new BottomNavigationBarItem(
icon: new Icon(Icons.access_time),
title: new Text('Time')
),
new DestinationLabel(
new BottomNavigationBarItem(
icon: new Icon(Icons.add),
title: new Text('Add')
)
......@@ -212,20 +212,20 @@ void main() {
child: new Scaffold(
bottomNavigationBar: new BottomNavigationBar(
type: BottomNavigationBarType.fixed,
labels: <DestinationLabel>[
new DestinationLabel(
items: <BottomNavigationBarItem>[
new BottomNavigationBarItem(
icon: new Icon(Icons.ac_unit),
title: new Text('AC')
),
new DestinationLabel(
new BottomNavigationBarItem(
icon: new Icon(Icons.access_alarm),
title: new Text('Alarm')
),
new DestinationLabel(
new BottomNavigationBarItem(
icon: new Icon(Icons.access_time),
title: new Text('Time')
),
new DestinationLabel(
new BottomNavigationBarItem(
icon: new Icon(Icons.add),
title: new Text('Add')
)
......@@ -247,12 +247,12 @@ void main() {
new Scaffold(
bottomNavigationBar: new BottomNavigationBar(
iconSize: 12.0,
labels: <DestinationLabel>[
new DestinationLabel(
items: <BottomNavigationBarItem>[
new BottomNavigationBarItem(
title: new Text('A'),
icon: new Icon(Icons.ac_unit),
),
new DestinationLabel(
new BottomNavigationBarItem(
title: new Text('B'),
icon: new Builder(
builder: (BuildContext context) {
......
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