Updated tests in material/bottom_navigation_bar_test.dart (#66670)
This commit is contained in:
@@ -35,7 +35,7 @@ Future<void> main() async {
|
||||
items: <BottomNavigationBarItem>[
|
||||
BottomNavigationBarItem(
|
||||
icon: ImageIcon(MemoryImage(Uint8List.fromList(kTransparentImage))),
|
||||
title: const Text('Tab 1'),
|
||||
label: 'Tab 1',
|
||||
),
|
||||
],
|
||||
));
|
||||
@@ -53,11 +53,11 @@ Future<void> main() async {
|
||||
items: <BottomNavigationBarItem>[
|
||||
BottomNavigationBarItem(
|
||||
icon: ImageIcon(MemoryImage(Uint8List.fromList(kTransparentImage))),
|
||||
title: const Text('Tab 1'),
|
||||
label: 'Tab 1',
|
||||
),
|
||||
BottomNavigationBarItem(
|
||||
icon: ImageIcon(MemoryImage(Uint8List.fromList(kTransparentImage))),
|
||||
title: const Text('Tab 2'),
|
||||
label: 'Tab 2',
|
||||
),
|
||||
],
|
||||
currentIndex: 1,
|
||||
@@ -119,11 +119,11 @@ Future<void> main() async {
|
||||
items: <BottomNavigationBarItem>[
|
||||
BottomNavigationBarItem(
|
||||
icon: ImageIcon(MemoryImage(Uint8List.fromList(kTransparentImage))),
|
||||
title: const Text('Tab 1'),
|
||||
label: 'Tab 1',
|
||||
),
|
||||
BottomNavigationBarItem(
|
||||
icon: ImageIcon(MemoryImage(Uint8List.fromList(kTransparentImage))),
|
||||
title: const Text('Tab 2'),
|
||||
label: 'Tab 2',
|
||||
),
|
||||
],
|
||||
currentIndex: 1,
|
||||
@@ -160,11 +160,11 @@ Future<void> main() async {
|
||||
items: <BottomNavigationBarItem>[
|
||||
BottomNavigationBarItem(
|
||||
icon: ImageIcon(MemoryImage(Uint8List.fromList(kTransparentImage))),
|
||||
title: const Text('Tab 1'),
|
||||
label: 'Tab 1',
|
||||
),
|
||||
BottomNavigationBarItem(
|
||||
icon: ImageIcon(MemoryImage(Uint8List.fromList(kTransparentImage))),
|
||||
title: const Text('Tab 2'),
|
||||
label: 'Tab 2',
|
||||
),
|
||||
],
|
||||
currentIndex: 1,
|
||||
@@ -197,11 +197,11 @@ Future<void> main() async {
|
||||
items: <BottomNavigationBarItem>[
|
||||
BottomNavigationBarItem(
|
||||
icon: ImageIcon(MemoryImage(Uint8List.fromList(kTransparentImage))),
|
||||
title: const Text('Tab 1'),
|
||||
label: 'Tab 1',
|
||||
),
|
||||
BottomNavigationBarItem(
|
||||
icon: ImageIcon(MemoryImage(Uint8List.fromList(kTransparentImage))),
|
||||
title: const Text('Tab 2'),
|
||||
label: 'Tab 2',
|
||||
),
|
||||
],
|
||||
currentIndex: 1,
|
||||
@@ -228,11 +228,11 @@ Future<void> main() async {
|
||||
items: <BottomNavigationBarItem>[
|
||||
BottomNavigationBarItem(
|
||||
icon: ImageIcon(MemoryImage(Uint8List.fromList(kTransparentImage))),
|
||||
title: const Text('Tab 1'),
|
||||
label: 'Tab 1',
|
||||
),
|
||||
BottomNavigationBarItem(
|
||||
icon: ImageIcon(MemoryImage(Uint8List.fromList(kTransparentImage))),
|
||||
title: const Text('Tab 2'),
|
||||
label: 'Tab 2',
|
||||
),
|
||||
],
|
||||
currentIndex: 1,
|
||||
@@ -264,12 +264,12 @@ Future<void> main() async {
|
||||
items: <BottomNavigationBarItem>[
|
||||
BottomNavigationBarItem(
|
||||
icon: ImageIcon(MemoryImage(Uint8List.fromList(kTransparentImage))),
|
||||
title: const Text('Tab 1'),
|
||||
label: 'Tab 1',
|
||||
),
|
||||
BottomNavigationBarItem(
|
||||
icon: ImageIcon(inactiveIcon),
|
||||
activeIcon: ImageIcon(activeIcon),
|
||||
title: const Text('Tab 2'),
|
||||
label: 'Tab 2',
|
||||
),
|
||||
],
|
||||
currentIndex: 1,
|
||||
@@ -292,11 +292,11 @@ Future<void> main() async {
|
||||
items: <BottomNavigationBarItem>[
|
||||
BottomNavigationBarItem(
|
||||
icon: ImageIcon(MemoryImage(Uint8List.fromList(kTransparentImage))),
|
||||
title: const Text('Aka'),
|
||||
label: 'Aka',
|
||||
),
|
||||
BottomNavigationBarItem(
|
||||
icon: ImageIcon(MemoryImage(Uint8List.fromList(kTransparentImage))),
|
||||
title: const Text('Shiro'),
|
||||
label: 'Shiro',
|
||||
),
|
||||
],
|
||||
);
|
||||
@@ -333,11 +333,11 @@ Future<void> main() async {
|
||||
items: <BottomNavigationBarItem>[
|
||||
BottomNavigationBarItem(
|
||||
icon: ImageIcon(MemoryImage(Uint8List.fromList(kTransparentImage))),
|
||||
title: const Text('Tab 1'),
|
||||
label: 'Tab 1',
|
||||
),
|
||||
BottomNavigationBarItem(
|
||||
icon: ImageIcon(MemoryImage(Uint8List.fromList(kTransparentImage))),
|
||||
title: const Text('Tab 2'),
|
||||
label: 'Tab 2',
|
||||
),
|
||||
],
|
||||
),
|
||||
@@ -351,11 +351,11 @@ Future<void> main() async {
|
||||
items: <BottomNavigationBarItem>[
|
||||
BottomNavigationBarItem(
|
||||
icon: ImageIcon(MemoryImage(Uint8List.fromList(kTransparentImage))),
|
||||
title: const Text('Tab 1'),
|
||||
label: 'Tab 1',
|
||||
),
|
||||
BottomNavigationBarItem(
|
||||
icon: ImageIcon(MemoryImage(Uint8List.fromList(kTransparentImage))),
|
||||
title: const Text('Tab 2'),
|
||||
label: 'Tab 2',
|
||||
),
|
||||
],
|
||||
backgroundColor: const Color(0xFFFFFFFF), // Opaque white.
|
||||
@@ -374,11 +374,11 @@ Future<void> main() async {
|
||||
items: <BottomNavigationBarItem>[
|
||||
BottomNavigationBarItem(
|
||||
icon: ImageIcon(MemoryImage(Uint8List.fromList(kTransparentImage))),
|
||||
title: const Text('Tab 1'),
|
||||
label: 'Tab 1',
|
||||
),
|
||||
BottomNavigationBarItem(
|
||||
icon: ImageIcon(MemoryImage(Uint8List.fromList(kTransparentImage))),
|
||||
title: const Text('Tab 2'),
|
||||
label: 'Tab 2',
|
||||
),
|
||||
],
|
||||
currentIndex: 1,
|
||||
@@ -399,11 +399,11 @@ Future<void> main() async {
|
||||
items: <BottomNavigationBarItem>[
|
||||
BottomNavigationBarItem(
|
||||
icon: ImageIcon(MemoryImage(Uint8List.fromList(kTransparentImage))),
|
||||
title: const Text('Tab 1'),
|
||||
label: 'Tab 1',
|
||||
),
|
||||
BottomNavigationBarItem(
|
||||
icon: ImageIcon(MemoryImage(Uint8List.fromList(kTransparentImage))),
|
||||
title: const Text('Tab 2'),
|
||||
label: 'Tab 2',
|
||||
),
|
||||
],
|
||||
),
|
||||
@@ -439,7 +439,7 @@ Future<void> main() async {
|
||||
icon: ImageIcon(
|
||||
MemoryImage(Uint8List.fromList(kTransparentImage)),
|
||||
),
|
||||
title: const Text('Tab 1'),
|
||||
label: 'Tab 1',
|
||||
),
|
||||
BottomNavigationBarItem(
|
||||
icon: ImageIcon(
|
||||
@@ -471,13 +471,13 @@ Future<void> main() async {
|
||||
icon: ImageIcon(
|
||||
MemoryImage(Uint8List.fromList(kTransparentImage)),
|
||||
),
|
||||
title: const Text('Tab 1'),
|
||||
label: 'Tab 1',
|
||||
),
|
||||
BottomNavigationBarItem(
|
||||
icon: ImageIcon(
|
||||
MemoryImage(Uint8List.fromList(kTransparentImage)),
|
||||
),
|
||||
title: const Text('Tab 2'),
|
||||
label: 'Tab 2',
|
||||
),
|
||||
],
|
||||
),
|
||||
@@ -497,13 +497,13 @@ Future<void> main() async {
|
||||
icon: ImageIcon(
|
||||
MemoryImage(Uint8List.fromList(kTransparentImage)),
|
||||
),
|
||||
title: const Text('Tab 1'),
|
||||
label: 'Tab 1',
|
||||
),
|
||||
BottomNavigationBarItem(
|
||||
icon: ImageIcon(
|
||||
MemoryImage(Uint8List.fromList(kTransparentImage)),
|
||||
),
|
||||
title: const Text('Tab 2'),
|
||||
label: 'Tab 2',
|
||||
),
|
||||
],
|
||||
backgroundColor: const Color(0xFFFFFFFF), // Opaque white.
|
||||
|
||||
@@ -287,7 +287,7 @@ void main() {
|
||||
tabBar: CupertinoTabBar(
|
||||
items: List<BottomNavigationBarItem>.generate(
|
||||
10,
|
||||
(int i) => BottomNavigationBarItem(icon: ImageIcon(MemoryImage(Uint8List.fromList(kTransparentImage))), title: Text('$i')),
|
||||
(int i) => BottomNavigationBarItem(icon: ImageIcon(MemoryImage(Uint8List.fromList(kTransparentImage))), label: '$i'),
|
||||
),
|
||||
),
|
||||
tabBuilder: (BuildContext context, int index) => const Text('content'),
|
||||
@@ -325,11 +325,11 @@ CupertinoTabBar _buildTabBar({ int selectedTab = 0 }) {
|
||||
items: <BottomNavigationBarItem>[
|
||||
BottomNavigationBarItem(
|
||||
icon: ImageIcon(MemoryImage(Uint8List.fromList(kTransparentImage))),
|
||||
title: const Text('Tab 1'),
|
||||
label: 'Tab 1',
|
||||
),
|
||||
BottomNavigationBarItem(
|
||||
icon: ImageIcon(MemoryImage(Uint8List.fromList(kTransparentImage))),
|
||||
title: const Text('Tab 2'),
|
||||
label: 'Tab 2',
|
||||
),
|
||||
],
|
||||
currentIndex: selectedTab,
|
||||
|
||||
@@ -425,11 +425,11 @@ void main() {
|
||||
items: const <BottomNavigationBarItem>[
|
||||
BottomNavigationBarItem(
|
||||
icon: Icon(CupertinoIcons.search),
|
||||
title: Text('Tab 1'),
|
||||
label: 'Tab 1',
|
||||
),
|
||||
BottomNavigationBarItem(
|
||||
icon: Icon(CupertinoIcons.settings),
|
||||
title: Text('Tab 2'),
|
||||
label: 'Tab 2',
|
||||
),
|
||||
],
|
||||
),
|
||||
|
||||
@@ -211,11 +211,11 @@ void main() {
|
||||
items: <BottomNavigationBarItem>[
|
||||
BottomNavigationBarItem(
|
||||
icon: ImageIcon(MemoryImage(Uint8List.fromList(kTransparentImage))),
|
||||
title: const Text('Tab 1'),
|
||||
label: 'Tab 1',
|
||||
),
|
||||
BottomNavigationBarItem(
|
||||
icon: ImageIcon(MemoryImage(Uint8List.fromList(kTransparentImage))),
|
||||
title: const Text('Tab 2'),
|
||||
label: 'Tab 2',
|
||||
),
|
||||
],
|
||||
),
|
||||
@@ -251,11 +251,11 @@ void main() {
|
||||
items: <BottomNavigationBarItem>[
|
||||
BottomNavigationBarItem(
|
||||
icon: ImageIcon(MemoryImage(Uint8List.fromList(kTransparentImage))),
|
||||
title: const Text('Tab 1'),
|
||||
label: 'Tab 1',
|
||||
),
|
||||
BottomNavigationBarItem(
|
||||
icon: ImageIcon(MemoryImage(Uint8List.fromList(kTransparentImage))),
|
||||
title: const Text('Tab 2'),
|
||||
label: 'Tab 2',
|
||||
),
|
||||
],
|
||||
),
|
||||
@@ -301,11 +301,11 @@ void main() {
|
||||
items: <BottomNavigationBarItem>[
|
||||
BottomNavigationBarItem(
|
||||
icon: ImageIcon(MemoryImage(Uint8List.fromList(kTransparentImage))),
|
||||
title: const Text('Tab 1'),
|
||||
label: 'Tab 1',
|
||||
),
|
||||
BottomNavigationBarItem(
|
||||
icon: ImageIcon(MemoryImage(Uint8List.fromList(kTransparentImage))),
|
||||
title: const Text('Tab 2'),
|
||||
label: 'Tab 2',
|
||||
),
|
||||
],
|
||||
),
|
||||
|
||||
@@ -45,7 +45,7 @@ void main() {
|
||||
BottomNavigationBarItem tabGenerator(int index) {
|
||||
return BottomNavigationBarItem(
|
||||
icon: ImageIcon(MemoryImage(Uint8List.fromList(kTransparentImage))),
|
||||
title: Text('Tab ${index + 1}'),
|
||||
label: 'Tab ${index + 1}',
|
||||
);
|
||||
}
|
||||
|
||||
@@ -1079,7 +1079,7 @@ void main() {
|
||||
tabBar: CupertinoTabBar(
|
||||
items: List<BottomNavigationBarItem>.generate(
|
||||
10,
|
||||
(int i) => BottomNavigationBarItem(icon: ImageIcon(MemoryImage(Uint8List.fromList(kTransparentImage))), title: Text('$i')),
|
||||
(int i) => BottomNavigationBarItem(icon: ImageIcon(MemoryImage(Uint8List.fromList(kTransparentImage))), label: '$i'),
|
||||
),
|
||||
),
|
||||
tabBuilder: (BuildContext context, int index) => const Text('content'),
|
||||
@@ -1221,11 +1221,11 @@ CupertinoTabBar _buildTabBar({ int selectedTab = 0 }) {
|
||||
items: <BottomNavigationBarItem>[
|
||||
BottomNavigationBarItem(
|
||||
icon: ImageIcon(MemoryImage(Uint8List.fromList(kTransparentImage))),
|
||||
title: const Text('Tab 1'),
|
||||
label: 'Tab 1',
|
||||
),
|
||||
BottomNavigationBarItem(
|
||||
icon: ImageIcon(MemoryImage(Uint8List.fromList(kTransparentImage))),
|
||||
title: const Text('Tab 2'),
|
||||
label: 'Tab 2',
|
||||
),
|
||||
],
|
||||
currentIndex: selectedTab,
|
||||
|
||||
Reference in New Issue
Block a user