mirror of
https://github.com/flutter/flutter.git
synced 2026-02-20 02:29:02 +08:00
## What's new?
Now that we're sending down "true" display information to the framework,
we also need to send down the correct display id in the
WindowMetricsEvent for the view so that the display resolves properly.
This pull request adds that :)
## How to test
Here's a silly app that makes sure that our `Display` is legit:
```dart
// Copyright 2014 The Flutter Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
import 'package:flutter/widgets.dart';
void main() => runApp(W());
class W extends StatelessWidget {
@override
Widget build(BuildContext context) {
final x = View.of(context);
print(x.display.id);
return const Center(
child: Text('Hello, world!', key: Key('title'), textDirection: TextDirection.ltr),
);
}
}
```
## 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.
Flutter Engine
The Flutter Engine is a portable runtime for hosting Flutter applications. It implements Flutter's core libraries, including animation and graphics, file and network I/O, accessibility support, plugin architecture, and a Dart runtime and compile toolchain. Most developers will interact with Flutter via the Flutter Framework, which provides a modern, reactive framework, and a rich set of platform, layout and foundation widgets.
More tooling is available to make development experiences easier:
| Target | Tool |
|---|---|
| Web | felt |
| Mobile or Desktop | et |
To learn about running tests, see testing the engine.