Skip to content
This repository was archived by the owner on Feb 22, 2023. It is now read-only.

[android_intent] Bump to Flutter stable, remove deprecation warnings #2586

Merged
merged 13 commits into from
Mar 8, 2020

Conversation

ened
Copy link
Contributor

@ened ened commented Mar 7, 2020

Description

Bumps dart & flutter version & adds a little bit of house keeping so that the next PR is distraction free.

Checklist

Before you create this PR confirm that it meets all requirements listed below by checking the relevant checkboxes ([x]). This will ensure a smooth and quick review process.

  • I read the Contributor Guide and followed the process outlined there for submitting PRs.
  • My PR includes unit or integration tests for all changed/updated/fixed behaviors (See Contributor Guide).
  • All existing and new tests are passing.
  • I updated/added relevant documentation (doc comments with ///).
  • The analyzer (flutter analyze) does not report any problems on my PR.
  • I read and followed the Flutter Style Guide.
  • The title of the PR starts with the name of the plugin surrounded by square brackets, e.g. [shared_preferences]
  • I updated pubspec.yaml with an appropriate new version according to the pub versioning philosophy.
  • I updated CHANGELOG.md to add a description of the change.
  • I signed the CLA.
  • I am willing to follow-up on review comments in a timely manner.

Breaking Change

Does your PR require plugin users to manually update their apps to accommodate your change?

  • No, this is not a breaking change.

sdk: ">=2.0.0-dev.28.0 <3.0.0"
flutter: ">=1.10.0 <2.0.0"
sdk: ">=2.3.0 <3.0.0"
flutter: ">=1.12.13+hotfix.5 <2.0.0"
Copy link
Contributor

Choose a reason for hiding this comment

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

Is there a reason that we're bumping the min supported Dart and Flutter versions?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The Dart version was increased to make the spread operator available.

Flutter version was increased to the latest stable version to be inline with other plugins like google_maps, connectivity etc.

Copy link
Contributor

Choose a reason for hiding this comment

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

Should we be forcing all consumers of this plugin to upgrade their Dart version just so that this plugin can use the spread operator? I'm not sure how many people are on various versions of Dart, but my initial thought is that using the spread operator is a pretty trivial detail and we probably shouldn't force a language change on people just do that. Thoughts?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Glad you asked. I had similar concerns but ended up with:

  • Current stable is referring to Dart 2.7, while this PR only bumps to 2.3 (when spread was introduced, roughly)
    • Every time I bump a Flutter version on my machine, the bundled Dart version is synced
    • The previous stable version (1.9) shipped with Dart 2.5, so I think we're ok
  • IMO Flutters official plugins should showcase new language (stable) features so that users adopt them quicker, thus making the the platform more attractive
    • Flutters style guide mentions how to use the spread operator, so I assumed it's already accepted
  • Reducing LOC is always a compelling argument although not too strong one here

Copy link
Contributor

Choose a reason for hiding this comment

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

I think current stable including a higher version of Dart already makes this a non-issue.

Copy link
Contributor

Choose a reason for hiding this comment

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

As @mklim mentioned, your first bullet point is probably the right answer. If stable has bumped Dart then we're probably good.

I would caution the 2nd and 3rd bullet points. I actually don't think using new language features or showcasing capabilities would be seen as an appropriate reason to break versions. I'll defer to @amirh and @Hixie in that regard, but that would be my guess.

In any case, bullet point 1 makes sense and works for me.

Copy link
Contributor

@mklim mklim left a comment

Choose a reason for hiding this comment

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

LGTM. This PR doesn't introduce tests, but the existing tests in android_intent already cover its functionality since this is a refactor with no behavioral changes.

If you're open to expanding this PR more, there's a longer list of TODOs we'd like to fix on each plugin when we upgrade it to the latest stable (flutter/flutter#47153). There are a few hacks in this plugin to make it backwards compatible with the previous stable that aren't needed since you're bumping the version now, and they could be fixed as part of this PR. I don't think this PR should be blocked on those TODOs though so no pressure if you don't want to expand this more and just want to land this as-is.

Copy link
Contributor

@mklim mklim left a comment

Choose a reason for hiding this comment

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

Thanks for going back and fixing the other TODOs here!

sdk: ">=2.0.0-dev.28.0 <3.0.0"
flutter: ">=1.10.0 <2.0.0"
sdk: ">=2.3.0 <3.0.0"
flutter: ">=1.12.13+hotfix.5 <2.0.0"
Copy link
Contributor

Choose a reason for hiding this comment

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

I think current stable including a higher version of Dart already makes this a non-issue.

Copy link
Contributor

@matthew-carroll matthew-carroll left a comment

Choose a reason for hiding this comment

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

LGTM

@ened ened merged commit 4d91c96 into flutter:master Mar 8, 2020
@ened
Copy link
Contributor Author

ened commented Mar 9, 2020

@mklim @matthew-carroll thank you for reviewing this PR. How could the updated packaged be pushed to pub?

EdwinRomelta pushed a commit to EdwinRomelta/plugins that referenced this pull request Jun 11, 2020
…lutter#2586)

* Bumps Flutter & Dart dependencies to stable
* Uses spread operator to concisely build arguments
* Refactors and cleans up the plugin a bit
FlutterSu pushed a commit to FlutterSu/flutter-plugins that referenced this pull request Nov 20, 2020
…lutter#2586)

* Bumps Flutter & Dart dependencies to stable
* Uses spread operator to concisely build arguments
* Refactors and cleans up the plugin a bit
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants