Skip to content

Conversation

@loic-sharma
Copy link
Member

@loic-sharma loic-sharma commented Jul 8, 2025

Currently, google3's implementation of FeatureFlags.isEnabled throws. Instead, you have to call FeatureFlags.isFooEnabled, which in google3 returns hardcoded values (google3 does not allow for features to be enabled through configs).

This provides an implementation of FeatureFlags.isEnabled that returns the hardcoded values.

Part of #167668

Alternatives considered

Since this implementation is used by google3, I considered downstreaming this logic to google3. However, this would be brittle: whenever we add a new feature flag, we would need to remember to update google3's FeatureFlags.isEnabled implementation. And since we need to roll the new flag to google3 before we can update google3's FeatureFlags.isEnabled implementation, we can't write a google3 test that verifies that all flags are supported by google3's FeatureFlags.isEnabled.

Pre-launch Checklist

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

@github-actions github-actions bot added the tool Affects the "flutter" command-line tool. See also t: labels. label Jul 8, 2025
}

/// All Flutter feature flags that are enabled.
// This member is overriden in google3.
Copy link
Member Author

@loic-sharma loic-sharma Jul 8, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Originally my plan was to override this in google3 with something like:

@override
Iterable<Feature> get allEnabledFeatures {
  return <Feature>[
    if (isWebEnabled) flutterWebFeature,
    if (isLinuxEnabled) flutterLinuxDesktopFeature,
    ...
  ];
}

However, I reconsidered as this would be brittle: when we add a few flag, we'd need to remember to update google3's FeatureFlags.allEnabledFeatures implementation. With this new approach, google3's FeatureFlags.isEnabled and FeatureFlags.allEnabledFeatures will just work without any overrides.

@loic-sharma loic-sharma requested review from bkonyi and matanlurey July 8, 2025 21:08
@loic-sharma loic-sharma marked this pull request as ready for review July 8, 2025 21:08
@loic-sharma loic-sharma requested a review from chingjun July 8, 2025 21:08
///
/// This default implementation is used by google3 to facilitate rolls.
/// In Flutter, this is overriden by [FlutterFeatureFlags.isEnabled].
bool isEnabled(Feature feature) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I understand why we are doing this, but it's unfortunate because it further increases the cost of new feature flags.

Could you explain why => false isn't a good enough default implementation, or why we need a default implementation at all?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If we went with => false approach, here's the process we'd need to do to add a new feature flag:

  1. Add feature flag to the tool
  2. Wait until this rolls to google3
  3. Update google3 to also add the feature flag to the tool (see this)

We'd be very likely to forget that third step.

With the approach in this PR, all of the work to add a feature flag is centralized in the Flutter tool. google3 wouldn't need any updates to add the new feature flag.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you expand on that - why isn't the default of false ok? I think it's going to be pretty rare that, for something that deserves to be flagged, we don't want to explicitly (and separately) turn it on in google3.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Couldn't we make Feature an enum and drop the default case in this switch? That would cause FRoB to fail without a G3Fix since this switch wouldn't be exhaustive if we add a new value to Feature.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's assuming that we move this implementation of isEnabled into google3.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A feature flag is very likely to require additional work in google3. Even if we make the flutter_tools believe that a certain feature flag is enabled, it might not actually work.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If we went with the default of false here, it would allow us to be in weird middle states. For example:

  1. I add fooFeature and FeatureFlags.isFooEnabled to the Flutter tool and make it on by default.
  2. This rolls into google3. At this point, google3's FeatureFlags.isFooEnabled is true but FeatureFlags.allEnabledFeatures excludes fooFeature.

To fix this, I have to remember to update google3's FeatureFlags.allEnabledFeatures override to do the right thing:

@override
Iterable<Feature> get allEnabledFeatures {
  return <Feature>[
    if (isWebEnabled) flutterWebFeature,
    if (isLinuxEnabled) flutterLinuxDesktopFeature,
    ...
+   if (isFooEnabled), fooFeature,
  ];
}

IMO, this is error-prone. Folks will forget to update google3's feature flags, which will cause weird behaviors in google3.

This problem is avoided by this PR's approach.

Copy link
Contributor

@bkonyi bkonyi Jul 8, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

IMO, this is error-prone. Folks will forget to update google3's feature flags, which will cause weird behaviors in google3.

They won't forget if Feature is an enum and it breaks compilation when we no longer exhaustively check each value 😄

Copy link
Member Author

@loic-sharma loic-sharma Jul 8, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh sorry, I didn't mean to ignore folks' comments in this thread. Y'all replied after I opened the tab, I didn't see your replies until I refreshed the page 😅

Couldn't we make Feature an enum and drop the default case in this switch? That would cause FRoB to fail without a G3Fix since this switch wouldn't be exhaustive if we add a new value to Feature.

I think this alternative solution would work too, but personally I'd prefer a solution that avoids g3fixes. That said, I'm happy to switch to that approach if everyone else prefers it.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No problem! GitHub is being weird and not refreshing comments automatically for me.

When it comes to experiments in google3, it's probably worth forcing whoever is creating a new feature to add the G3Fix so it can be deliberately enabled or disabled for google3. I'd also rather keep things simpler in open-source land and let google3 handle its own special cases in general, but that's just my gut feeling... 😃

///
/// This default implementation is used by google3 to facilitate rolls.
/// In Flutter, this is overriden by [FlutterFeatureFlags.isEnabled].
bool isEnabled(Feature feature) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A feature flag is very likely to require additional work in google3. Even if we make the flutter_tools believe that a certain feature flag is enabled, it might not actually work.

/// In Flutter, this is overriden by [FlutterFeatureFlags.isEnabled].
bool isEnabled(Feature feature) {
return switch (feature) {
flutterWebFeature => isWebEnabled,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In https://github.com/flutter/flutter/blob/master/packages/flutter_tools/lib/src/flutter_features.dart#L24, isWebEnabled is implemented by calling isEnabled. I think it would be better to consistently treat isEnabled as the more lower-level API than is*Enabled.

Copy link
Member Author

@loic-sharma loic-sharma Jul 8, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There's two layers here:

  1. FeatureFlags - This is basically just isFooEnabled properties with static defaults. This is what google3 uses, effectively.
  2. FlutterFeatureFlags - This adds runtime configuration (from env variables and more). This is what the Flutter tool uses. FlutterFeatureFlags replaces FeatureFlags's logic entirely, it just uses FeatureFlags as an interface.

At the FlutterFeatureFlags layer, isEnabled's logic is completely replaced. isEnabled remains the lower-level API than isFooEnabled.

At this FeatureFlags layer, you're right that isEnabled is now a higher-level API than isFooEnabled. However, IMO that's perfectly acceptable: FeatureFlags is just an interface from FlutterFeatureFlags's perspective, it doesn't matter which API is higher or lower level.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes I have no doubt that the code will function correctly. But it's still better to be consistent to help the future maintainers to build a better mental model. It's also more error prone.

I could imagine someone being confused, like I did, when they are reading this and wondering how this could work. Especially that there are some amount of code that only exists in google3.

That's why I think we should be consistent in both layers.

@loic-sharma
Copy link
Member Author

A feature flag is very likely to require additional work in google3. Even if we make the flutter_tools believe that a certain feature flag is enabled, it might not actually work.

This concern exists today. If you want to control feature flags separately in Flutter versus google3, you'll need to do the same thing before and after this PR: you'll need to update google3 to override FeatureFlags.isFooEnabled.

@loic-sharma
Copy link
Member Author

@bkonyi @matanlurey I chatted with @chingjun offline. What would y'all think of making google3 implement FeatureFlags instead of extending it? Anytime you add a new feature flag, google3 will need a g3fix. That's also when you'll need to update google3's isEnabled method to do the right thing.

@bkonyi
Copy link
Contributor

bkonyi commented Jul 9, 2025

@bkonyi @matanlurey I chatted with @chingjun offline. What would y'all think of making google3 implement FeatureFlags instead of extending it? Anytime you add a new feature flag, google3 will need a g3fix. That's also when you'll need to update google3's isEnabled method to do the right thing.

I think that sounds reasonable!

@matanlurey
Copy link
Contributor

@bkonyi @matanlurey I chatted with @chingjun offline. What would y'all think of making google3 implement FeatureFlags instead of extending it? Anytime you add a new feature flag, google3 will need a g3fix. That's also when you'll need to update google3's isEnabled method to do the right thing.

I just don't understand why we'd want to add work for something that is going to happen very rarely (wanting to enable a flag specifically for google3 at the exact same time we add it, ostensibly disabled by default, for the external tool).

That being said, this is easy to change. Let's just make a decision, document what it is, and move on.

Copy link
Contributor

@chingjun chingjun left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I just don't understand why we'd want to add work for something that is going to happen very rarely (wanting to enable a flag specifically for google3 at the exact same time we add it, ostensibly disabled by default, for the external tool).

The "additional work" is incurred when they add a new feature flag. When someone is adding a new feature flag, we want them to know that the flag doesn't work in google3 as is and probably require additional work.

And the reason we are making this change, is because we intend to make it easier to add new feature flags in the flutter tools, especially runtime feature flags. These do require additional work in google3. It's better to know ahead of time so that they could plan around it.

/// In Flutter, this is overriden by [FlutterFeatureFlags.isEnabled].
bool isEnabled(Feature feature) {
return switch (feature) {
flutterWebFeature => isWebEnabled,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes I have no doubt that the code will function correctly. But it's still better to be consistent to help the future maintainers to build a better mental model. It's also more error prone.

I could imagine someone being confused, like I did, when they are reading this and wondering how this could work. Especially that there are some amount of code that only exists in google3.

That's why I think we should be consistent in both layers.

@loic-sharma
Copy link
Member Author

github-merge-queue bot pushed a commit that referenced this pull request Jul 11, 2025
_⚠️ Landing this is blocked until: 1)
https://critique.corp.google.com/cl/781275353 lands and 2) google3 is
updated to add the new feature flag introduced in
#171903

Currently, google3's `Google3Features` extends `FeatureFlags`. As a
result, google3 automatically gets the same feature flag values as in
Flutter.

This makes Flutter's feature flag values abstract, thereby requiring
that google3's `Google3Features` must explicitly set each feature flag's
value.

Discussion that motivated this change:
#171797
Internal CL: https://critique.corp.google.com/cl/781275353
Part of: #167668

## 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.

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
[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/
[flutter/tests]: https://github.com/flutter/tests
[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
justinmc pushed a commit to justinmc/flutter that referenced this pull request Jul 11, 2025
_⚠️ Landing this is blocked until: 1)
https://critique.corp.google.com/cl/781275353 lands and 2) google3 is
updated to add the new feature flag introduced in
flutter#171903

Currently, google3's `Google3Features` extends `FeatureFlags`. As a
result, google3 automatically gets the same feature flag values as in
Flutter.

This makes Flutter's feature flag values abstract, thereby requiring
that google3's `Google3Features` must explicitly set each feature flag's
value.

Discussion that motivated this change:
flutter#171797
Internal CL: https://critique.corp.google.com/cl/781275353
Part of: flutter#167668

## 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.

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
[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/
[flutter/tests]: https://github.com/flutter/tests
[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
azatech pushed a commit to azatech/flutter that referenced this pull request Jul 28, 2025
_⚠️ Landing this is blocked until: 1)
https://critique.corp.google.com/cl/781275353 lands and 2) google3 is
updated to add the new feature flag introduced in
flutter#171903

Currently, google3's `Google3Features` extends `FeatureFlags`. As a
result, google3 automatically gets the same feature flag values as in
Flutter.

This makes Flutter's feature flag values abstract, thereby requiring
that google3's `Google3Features` must explicitly set each feature flag's
value.

Discussion that motivated this change:
flutter#171797
Internal CL: https://critique.corp.google.com/cl/781275353
Part of: flutter#167668

## 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.

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
[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/
[flutter/tests]: https://github.com/flutter/tests
[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
ksokolovskyi pushed a commit to ksokolovskyi/flutter that referenced this pull request Aug 19, 2025
_⚠️ Landing this is blocked until: 1)
https://critique.corp.google.com/cl/781275353 lands and 2) google3 is
updated to add the new feature flag introduced in
flutter#171903

Currently, google3's `Google3Features` extends `FeatureFlags`. As a
result, google3 automatically gets the same feature flag values as in
Flutter.

This makes Flutter's feature flag values abstract, thereby requiring
that google3's `Google3Features` must explicitly set each feature flag's
value.

Discussion that motivated this change:
flutter#171797
Internal CL: https://critique.corp.google.com/cl/781275353
Part of: flutter#167668

## 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.

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
[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/
[flutter/tests]: https://github.com/flutter/tests
[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
mboetger pushed a commit to mboetger/flutter that referenced this pull request Sep 18, 2025
_⚠️ Landing this is blocked until: 1)
https://critique.corp.google.com/cl/781275353 lands and 2) google3 is
updated to add the new feature flag introduced in
flutter#171903

Currently, google3's `Google3Features` extends `FeatureFlags`. As a
result, google3 automatically gets the same feature flag values as in
Flutter.

This makes Flutter's feature flag values abstract, thereby requiring
that google3's `Google3Features` must explicitly set each feature flag's
value.

Discussion that motivated this change:
flutter#171797
Internal CL: https://critique.corp.google.com/cl/781275353
Part of: flutter#167668

## 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.

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
[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/
[flutter/tests]: https://github.com/flutter/tests
[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
lucaantonelli pushed a commit to lucaantonelli/flutter that referenced this pull request Nov 21, 2025
_⚠️ Landing this is blocked until: 1)
https://critique.corp.google.com/cl/781275353 lands and 2) google3 is
updated to add the new feature flag introduced in
flutter#171903

Currently, google3's `Google3Features` extends `FeatureFlags`. As a
result, google3 automatically gets the same feature flag values as in
Flutter.

This makes Flutter's feature flag values abstract, thereby requiring
that google3's `Google3Features` must explicitly set each feature flag's
value.

Discussion that motivated this change:
flutter#171797
Internal CL: https://critique.corp.google.com/cl/781275353
Part of: flutter#167668

## 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.

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
[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/
[flutter/tests]: https://github.com/flutter/tests
[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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

tool Affects the "flutter" command-line tool. See also t: labels.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants