Reverts "Remove hack from PageView." (#141479)

Reverts flutter/flutter#141138
Initiated by: itsjustkevin
This change reverts the following previous change:
Original Description:
Fixes https://github.com/flutter/flutter/issues/141119

The change is breaking, because now controller is nullable.

Migration path: https://github.com/flutter/website/pull/10033

Packages to fix:
This commit is contained in:
auto-submit[bot]
2024-01-12 21:19:18 +00:00
committed by GitHub
parent 8bab8a40f2
commit 8f797fc379
4 changed files with 41 additions and 134 deletions

View File

@@ -49,7 +49,7 @@ void main() {
// Verify that page view index is also updated with same index to page indicator.
final PageView pageView = tester.widget<PageView>(find.byType(PageView));
expect(pageView.controller!.page, 1);
expect(pageView.controller.page, 1);
// Tap backward button on page indicator area.
await tester.tap(find.byIcon(Icons.arrow_left_rounded));