make @immutable const classes (#9532)

* make @immutable const

* fix build
This commit is contained in:
Alexandre Ardhuin
2017-04-21 23:09:42 +02:00
committed by GitHub
parent 1abb6f5d74
commit 9541848272
166 changed files with 397 additions and 403 deletions

View File

@@ -14,7 +14,7 @@ void main() {
// We press the "1" and the "2" buttons and check that the display
// reads "12".
testWidgets('Flutter calculator app smoke test', (WidgetTester tester) async {
await tester.pumpWidget(new CalculatorDemo());
await tester.pumpWidget(const CalculatorDemo());
final Finder oneButton = find.widgetWithText(InkResponse, '1');
expect(oneButton, findsOneWidget);

View File

@@ -14,7 +14,7 @@ void main() {
testWidgets('Flutter gallery button example code displays', (WidgetTester tester) async {
// Regression test for https://github.com/flutter/flutter/issues/6147
await tester.pumpWidget(new GalleryApp());
await tester.pumpWidget(const GalleryApp());
await tester.pump(); // see https://github.com/flutter/flutter/issues/1865
await tester.pump(); // triggers a frame

View File

@@ -15,11 +15,11 @@ void main() {
testWidgets('Pesto appbar heroics', (WidgetTester tester) async {
await tester.pumpWidget(
// The bug only manifests itself when the screen's orientation is portrait
new Center(
child: new SizedBox(
const Center(
child: const SizedBox(
width: 400.0,
height: 800.0,
child: new GalleryApp()
child: const GalleryApp()
)
)
);
@@ -43,7 +43,7 @@ void main() {
});
testWidgets('Pesto can be scrolled all the way down', (WidgetTester tester) async {
await tester.pumpWidget(new GalleryApp());
await tester.pumpWidget(const GalleryApp());
await tester.pump(); // see https://github.com/flutter/flutter/issues/1865
await tester.tap(find.text('Pesto'));

View File

@@ -17,7 +17,7 @@ void main() {
// Regression test for https://github.com/flutter/flutter/pull/5168
testWidgets('update dialog', (WidgetTester tester) async {
await tester.pumpWidget(new GalleryApp(updateUrlFetcher: mockUpdateUrlFetcher));
await tester.pumpWidget(const GalleryApp(updateUrlFetcher: mockUpdateUrlFetcher));
await tester.pump(); // see https://github.com/flutter/flutter/issues/1865
await tester.pump(); // triggers a frame