Find a file
auto-submit[bot] 49f45d2095
Reverts "Fail tests on exceptions raised after test completed (#144706)" (#144970)
Reverts: flutter/flutter#144706
Initiated by: gspencergoog
Reason for reverting: This has broken the tree because some tests are still failing post completion. This particular one looks like it might have to do with a gold image not existing.
Original PR Author: goderbauer

Reviewed By: {Piinks}

This change reverts the following previous change:
A test was failing silently because of this (see https://github.com/flutter/flutter/issues/144353 and fixed in https://github.com/flutter/flutter/pull/144709). The failure went undetected for months. Ideally, this should have been a regular non-silent failure. This change makes that so. `package:test` can properly handle reported exceptions outside of test cases. With this change, the test fails as follows:

```
00:03 +82: Smoke test material/color_scheme/dynamic_content_color.0.dart
══╡ EXCEPTION CAUGHT BY FLUTTER TEST FRAMEWORK ╞════════════════════════════════════════════════════
The following assertion was thrown running a test (but after the test had completed):
setState() called after dispose(): _DynamicColorExampleState#1cd37(lifecycle state: defunct, not
mounted)
This error happens if you call setState() on a State object for a widget that no longer appears in
the widget tree (e.g., whose parent widget no longer includes the widget in its build). This error
can occur when code calls setState() from a timer or an animation callback.
The preferred solution is to cancel the timer or stop listening to the animation in the dispose()
callback. Another solution is to check the "mounted" property of this object before calling
setState() to ensure the object is still in the tree.
This error might indicate a memory leak if setState() is being called because another object is
retaining a reference to this State object after it has been removed from the tree. To avoid memory
leaks, consider breaking the reference to this object during dispose().

When the exception was thrown, this was the stack:
#0      State.setState.<anonymous closure> (package:flutter/src/widgets/framework.dart:1167:9)
#1      State.setState (package:flutter/src/widgets/framework.dart:1202:6)
#2      _DynamicColorExampleState._updateImage (package:flutter_api_samples/material/color_scheme/dynamic_content_color.0.dart:191:5)
<asynchronous suspension>
════════════════════════════════════════════════════════════════════════════════════════════════════
00:03 +81 -1: Smoke test material/context_menu/context_menu_controller.0.dart
00:03 +81 -1: Smoke test material/color_scheme/dynamic_content_color.0.dart [E]
  Test failed. See exception logs above.
  The test description was: Smoke test material/color_scheme/dynamic_content_color.0.dart
  
  This test failed after it had already completed.
  Make sure to use a matching library which informs the test runner
  of pending async work.
```
2024-03-11 23:31:18 +00:00
.github Bump codecov/codecov-action from 4.0.2 to 4.1.0 (#144174) 2024-03-05 23:55:05 +00:00
.vscode Adjust repo config for VS Code formatting (#122758) 2023-04-14 12:35:42 +02:00
bin Roll Flutter Engine from 9196947bc687 to 6745955bb49e (2 revisions) (#144946) 2024-03-11 18:35:24 +00:00
dev Reverts "Fail tests on exceptions raised after test completed (#144706)" (#144970) 2024-03-11 23:31:18 +00:00
examples Refactoring if chains into switch statements (#144905) 2024-03-11 23:04:57 +00:00
packages Reverts "Fail tests on exceptions raised after test completed (#144706)" (#144970) 2024-03-11 23:31:18 +00:00
.ci.yaml Mark Mac_arm64_ios module_test_ios bringup: true (#144861) 2024-03-08 17:01:40 -08:00
.gitattributes Add pre-stable support for create on Windows (#51895) 2020-03-23 10:42:26 -07:00
.gitignore add .pub-cache back to .gitignore (#128894) 2023-06-15 19:21:05 +00:00
analysis_options.yaml Allow deprecated members from the Dart SDK and Flutter Engine to roll in (#143347) 2024-02-13 10:41:46 -08:00
AUTHORS Added newline at end of .gitignore files (#141270) 2024-01-12 23:22:11 +00:00
CODE_OF_CONDUCT.md Update list of CoC contacts. (#130630) 2023-07-16 23:39:20 +00:00
CODEOWNERS Reverts "Refactor external_uiexternal_textures" (#142173) 2024-01-24 21:41:17 +00:00
CONTRIBUTING.md Add a DevTools section to CONTRIBUTING.md (#137193) 2023-11-13 21:51:07 +00:00
dartdoc_options.yaml Enable missing-code-block-language (#144443) 2024-03-01 01:06:53 +00:00
flutter_console.bat License update (#45373) 2019-11-27 15:04:02 -08:00
LICENSE License update (#45373) 2019-11-27 15:04:02 -08:00
PATENT_GRANT Rename patent file (#38686) 2019-08-16 16:54:58 +01:00
README.md Add Flutter CI status to README (#140513) 2024-01-04 18:26:48 +00:00
TESTOWNERS Remove force Xcode debug workflow (#144185) 2024-02-27 18:18:07 +00:00

Flutter

Flutter CI Status Discord badge Twitter handle codecov CII Best Practices OpenSSF Scorecard SLSA 1

Flutter is Google's SDK for crafting beautiful, fast user experiences for mobile, web, and desktop from a single codebase. Flutter works with existing code, is used by developers and organizations around the world, and is free and open source.

Documentation

For announcements about new releases, follow the flutter-announce@googlegroups.com mailing list. Our documentation also tracks breaking changes across releases.

Terms of service

The Flutter tool may occasionally download resources from Google servers. By downloading or using the Flutter SDK, you agree to the Google Terms of Service: https://policies.google.com/terms

For example, when installed from GitHub (as opposed to from a prepackaged archive), the Flutter tool will download the Dart SDK from Google servers immediately when first run, as it is used to execute the flutter tool itself. This will also occur when Flutter is upgraded (e.g. by running the flutter upgrade command).

About Flutter

We think Flutter will help you create beautiful, fast apps, with a productive, extensible and open development model, whether you're targeting iOS or Android, web, Windows, macOS, Linux or embedding it as the UI toolkit for a platform of your choice.

Beautiful user experiences

We want to enable designers to deliver their full creative vision without being forced to water it down due to limitations of the underlying framework. Flutter's layered architecture gives you control over every pixel on the screen and its powerful compositing capabilities let you overlay and animate graphics, video, text, and controls without limitation. Flutter includes a full set of widgets that deliver pixel-perfect experiences whether you're building for iOS (Cupertino) or other platforms (Material), along with support for customizing or creating entirely new visual components.

Reflectly hero image

Fast results

Flutter is fast. It's powered by hardware-accelerated 2D graphics libraries like Skia (that underpins Chrome and Android) and Impeller. We architected Flutter to support glitch-free, jank-free graphics at the native speed of your device.

Flutter code is powered by the world-class Dart platform, which enables compilation to 32-bit and 64-bit ARM machine code for iOS and Android, JavaScript and WebAssembly for the web, as well as Intel x64 and ARM for desktop devices.

Dart diagram

Productive development

Flutter offers stateful hot reload, allowing you to make changes to your code and see the results instantly without restarting your app or losing its state.

Hot reload animation

Extensible and open model

Flutter works with any development tool (or none at all), and also includes editor plug-ins for both Visual Studio Code and IntelliJ / Android Studio. Flutter provides tens of thousands of packages to speed your development, regardless of your target platform. And accessing other native code is easy, with support for both FFI (on Android, on iOS, on macOS, and on Windows) as well as platform-specific APIs.

Flutter is a fully open-source project, and we welcome contributions. Information on how to get started can be found in our contributor guide.