forked from firka/flutter
Re-enable missing_return (#20844)
This commit is contained in:
@@ -71,6 +71,7 @@ class CupertinoNavigationDemo extends StatelessWidget {
|
||||
],
|
||||
),
|
||||
tabBuilder: (BuildContext context, int index) {
|
||||
assert(index >= 0 && index <= 2);
|
||||
switch (index) {
|
||||
case 0:
|
||||
return new CupertinoTabView(
|
||||
@@ -95,8 +96,8 @@ class CupertinoNavigationDemo extends StatelessWidget {
|
||||
defaultTitle: 'Account',
|
||||
);
|
||||
break;
|
||||
default:
|
||||
}
|
||||
return null;
|
||||
},
|
||||
),
|
||||
),
|
||||
|
||||
@@ -155,7 +155,8 @@ class ScrollableTabsDemoState extends State<ScrollableTabsDemo> with SingleTicke
|
||||
controller: _controller,
|
||||
isScrollable: true,
|
||||
indicator: getIndicator(),
|
||||
tabs: _allPages.map((_Page page) {
|
||||
tabs: _allPages.map<Tab>((_Page page) {
|
||||
assert(_demoStyle != null);
|
||||
switch (_demoStyle) {
|
||||
case TabsDemoStyle.iconsAndText:
|
||||
return new Tab(text: page.text, icon: new Icon(page.icon));
|
||||
@@ -164,6 +165,7 @@ class ScrollableTabsDemoState extends State<ScrollableTabsDemo> with SingleTicke
|
||||
case TabsDemoStyle.textOnly:
|
||||
return new Tab(text: page.text);
|
||||
}
|
||||
return null;
|
||||
}).toList(),
|
||||
),
|
||||
),
|
||||
|
||||
@@ -156,7 +156,7 @@ Future<Null> runDemos(List<String> demos, FlutterDriver driver) async {
|
||||
await driver.tap(demoItem); // Launch the demo
|
||||
|
||||
if (kUnsynchronizedDemos.contains(demo)) {
|
||||
await driver.runUnsynchronized<Future<Null>>(() async {
|
||||
await driver.runUnsynchronized<void>(() async {
|
||||
await driver.tap(find.byTooltip('Back'));
|
||||
});
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user