mirror of
https://github.com/flutter/flutter.git
synced 2026-02-20 02:29:02 +08:00
This PR removes the unnecessary dependency on the Material library from expansible_test.dart by replacing `MaterialApp` with `WidgetsApp`. Part of #177415 ### Changes 1. **Import change**: Replaced `package:flutter/material.dart` with `package:flutter/widgets.dart` 2. **Widget setup**: Changed from `MaterialApp(home: ...)` to `TestWidgetsApp(home: ...)` - `WidgetsApp` requires either `builder`, `onGenerateRoute`, or `pageRouteBuilder` to be provided If neither builder nor onGenerateRoute are provided, the pageRouteBuilder must be specified so that the default handler will know what kind of PageRoute transition to build. 3. **Updated position assertions**: Since `WidgetsApp` with `builder` doesn't include the default scaffold/status bar padding that `MaterialApp` with `home` provides, the expected y-coordinate values were adjusted by -34 pixels: - `90.08984375` → `56.08984375` - `98.0` → `64.0` - `80.91015625` → `46.91015625` - `48.0` → `14.0` ## Pre-launch Checklist - [x] I read the [Contributor Guide] and followed the process outlined there for submitting PRs. - [x] I read the [Tree Hygiene] wiki page, which explains my responsibilities. - [x] I read and followed the [Flutter Style Guide], including [Features we expect every widget to implement]. - [x] I signed the [CLA]. - [x] I listed at least one issue that this PR fixes in the description above. - [x] I updated/added relevant documentation (doc comments with `///`). - [x] I added new tests to check the change I am making, or this PR is [test-exempt]. - [x] I followed the [breaking change policy] and added [Data Driven Fixes] where supported. - [x] All existing and new tests are passing.
This directory contains tools and resources that the Flutter team uses during the development of the framework. The tools in this directory should not be necessary for developing Flutter applications, though of course, they may be interesting if you are curious.
The tests in this directory are run in the framework_tests_misc-*
shards.