Sitelet https://github.com/flutter/flutter/pull/8885
Skip to content

Fixed extent lists cannot handle infinite extent - #8885

Merged
abarth merged 1 commit into
flutter:masterfrom
abarth:fixed_infinite
Mar 20, 2017
Merged

abarth merged 1 commit into
flutter:masterfrom
abarth:fixed_infinite

Conversation

@abarth

@abarth abarth commented Mar 20, 2017

Copy link
Copy Markdown
Contributor

Previously they tried to compute an integer target end index, but
integers can't represent infinity. Now we use null to represent
infinity.

Also, fix some similar issues with grids.

Fixes #8398

Previously they tried to compute an integer target end index, but
integers can't represent infinity. Now we use null to represent
infinity.

Also, fix some similar issues with grids.

Fixes flutter#8398
@abarth

abarth commented Mar 20, 2017

Copy link
Copy Markdown
Contributor Author

@Hixie

@Hixie

Hixie commented Mar 20, 2017

Copy link
Copy Markdown
Contributor

LGTM, but any time anyone hits this it's going to be because they have suboptimal code... A shrink-wrapping ListView in an unbounded constraint is just a really expensive BlockBody.

@abarth
abarth merged commit 9c87633 into flutter:master Mar 20, 2017
@abarth
abarth deleted the fixed_infinite branch March 20, 2017 19:45
@github-actions github-actions Bot locked as resolved and limited conversation to collaborators Aug 14, 2021
Piinks pushed a commit to huangyouhua1/flutter that referenced this pull request Aug 7, 2026
…r#189622)

`--web-define` substitution of `{{PLACEHOLDER}}` tokens in
`web/index.html` and
`flutter_bootstrap.js` worked in debug `flutter run` (serve-time
substitution in
`WebAssetServer`) and in `flutter build web` (`webDefine:`-prefixed
entries in the
build `Environment` consumed by the `WebTemplatedFiles` target), but not
in
`flutter run --profile` or `--release`: `ResidentWebRunner` stored the
parsed
defines in `_webDefines` and then omitted them from both
`WebBuilder.buildWeb()`
calls in the non-debug branch, and `ReleaseAssetServer` serves the build
output
verbatim with no serve-time templating, so the placeholders were never
replaced.

This passes `webDefines` to both `buildWeb()` call sites (the initial
build in
`run()` and the rebuild on hot restart), matching how `flutter build
web` already
passes them. Debug `--wasm` runs take the same branch and are fixed as a
side
effect. `flutter drive` never forwarded web-defines in any mode, so the
flag is
now plumbed through `DriverService.start()` into `WebDriverService` and
on to the
web runner.

Added unit tests assert that the build `Environment` receives the
`webDefine:`-prefixed defines in profile mode, on the rebuild after a
hot restart
in release mode, and in debug `--wasm` mode; that `WebDriverService`
forwards
web-defines to the web runner; and that the drive command forwards
`--web-define`
values to `DriverService.start()`.

Added end-to-end tests run the real tool against a fixture project whose
`web/index.html` and `web/flutter_bootstrap.js` contain `{{MY_VERSION}}`
and
`{{API_URL}}` placeholders: `flutter build web` in debug/profile/release
must
substitute them in `build/web/index.html` and
`build/web/flutter_bootstrap.js`,
and `flutter run -d web-server` in debug/profile/release must serve
substituted
HTML, including after hot reload (debug) and hot restart (all three
modes).
Existing web-define coverage for `flutter build web` and debug-mode
serving is
unchanged and passing.

Fixes flutter#8885 (was closed, but the problem was actually this - the flag
was only passed on specific run configurations). Also related to PR
flutter#175805 and issue flutter#127853

## Pre-launch Checklist

- [x] I read the [Contributor Guide] and followed the process outlined
there for submitting PRs.
- [x] I read the [AI contribution guidelines] and understand my
responsibilities, or I am not using AI tools.
- [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.

If you need help, consider asking for advice on the #hackers-new channel
on [Discord].

<!-- Links -->
[Contributor Guide]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#overview
[AI contribution guidelines]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#ai-contribution-guidelines
[Tree Hygiene]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md
[test-exempt]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#tests
[Flutter Style Guide]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md
[Features we expect every widget to implement]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md#features-we-expect-every-widget-to-implement
[CLA]: https://cla.developers.google.com/
[breaking change policy]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#handling-breaking-changes
[Discord]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Chat.md
[Data Driven Fixes]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Data-driven-Fixes.md

---------

Co-authored-by: Ben Konyi <bkonyi@google.com>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Fixed extent lists cannot handle infinite container extent

3 participants