Skip to content

Add macOS to TargetPlatform#43457

Merged
gspencergoog merged 10 commits intoflutter:masterfrom
gspencergoog:add_macos_platform
Nov 27, 2019
Merged

Add macOS to TargetPlatform#43457
gspencergoog merged 10 commits intoflutter:masterfrom
gspencergoog:add_macos_platform

Conversation

@gspencergoog
Copy link
Contributor

@gspencergoog gspencergoog commented Oct 24, 2019

Description

This PR adds TargetPlatform.macOS to the TargetPlatform enum. This allows us to begin implementation of some adaptive UI based on which target platform is desired.

I haven't updated the tests here, that will come in a follow-up PR.

Related Issues

Addresses part of #31366 (the macOS part).

Tests

  • Didn't modify tests, since that made this PR too difficult to review. Will update in a follow-on PR.

Breaking Change

  • Yes, this is a breaking change. Anyone using a switch statement on TargetPlatform will have to add TargetPlatform.macOS to avoid getting a lint warning and possible runtime problems.

@gspencergoog gspencergoog added framework flutter/packages/flutter repository. See also f: labels. a: desktop Running on desktop platform-mac Building on or for macOS specifically labels Oct 24, 2019
@fluttergithubbot fluttergithubbot added a: tests "flutter test", flutter_test, or one of our tests f: cupertino flutter/packages/flutter/cupertino repository f: material design flutter/packages/flutter/material repository. work in progress; do not review labels Oct 24, 2019
@gspencergoog gspencergoog force-pushed the add_macos_platform branch 2 times, most recently from f685d3e to 2a9d056 Compare October 31, 2019 19:56
@stuartmorgan-g
Copy link
Contributor

We should change this to not include macOS, and this to pass false as part of this PR.

(I'd like to keep the overall code around for now even though it'll be inactive in case we want it for Windows or Linux before those targets are adde.)

@gspencergoog
Copy link
Contributor Author

Thanks @stuartmorgan, I'll add those changes.

@gspencergoog gspencergoog force-pushed the add_macos_platform branch 3 times, most recently from f2b92c2 to f6a9903 Compare November 19, 2019 09:08
@gspencergoog gspencergoog force-pushed the add_macos_platform branch 2 times, most recently from 8f4545f to 937fb9d Compare November 25, 2019 17:01
@gspencergoog gspencergoog marked this pull request as ready for review November 25, 2019 17:12
@fluttergithubbot fluttergithubbot added d: examples Sample code and demos c: contributor-productivity Team-specific productivity, code health, technical debt. customer: gallery Relating to flutter/gallery repository. Please transfer non-framework issues there. tool Affects the "flutter" command-line tool. See also t: labels. labels Nov 25, 2019
@gspencergoog gspencergoog removed d: examples Sample code and demos f: cupertino flutter/packages/flutter/cupertino repository f: material design flutter/packages/flutter/material repository. c: contributor-productivity Team-specific productivity, code health, technical debt. customer: gallery Relating to flutter/gallery repository. Please transfer non-framework issues there. labels Nov 25, 2019
@gspencergoog
Copy link
Contributor Author

Actually, since this doesn't break any tests, this falls under "Class 3" breaking change, where I'll make the change, but send out a notice.

Class 3: "Other changes that do not break any tests, but where we can imagine reasonable scenarios where developers would be affected negatively."

@fluttergithubbot fluttergithubbot added d: examples Sample code and demos f: cupertino flutter/packages/flutter/cupertino repository f: material design flutter/packages/flutter/material repository. c: contributor-productivity Team-specific productivity, code health, technical debt. customer: gallery Relating to flutter/gallery repository. Please transfer non-framework issues there. tool Affects the "flutter" command-line tool. See also t: labels. labels Nov 25, 2019
@gspencergoog gspencergoog removed d: examples Sample code and demos f: cupertino flutter/packages/flutter/cupertino repository f: material design flutter/packages/flutter/material repository. c: contributor-productivity Team-specific productivity, code health, technical debt. customer: gallery Relating to flutter/gallery repository. Please transfer non-framework issues there. labels Nov 25, 2019
@dnfield
Copy link
Contributor

dnfield commented Nov 26, 2019

Should we just go ahead and pre-emptively add linux and windows too?

@gspencergoog
Copy link
Contributor Author

@dnfield No, we're not ready to do that for those platforms yet, since they're not at alpha quality yet. Once they get there, we'll add them.

@gspencergoog gspencergoog mentioned this pull request Nov 26, 2019
1 task
Copy link
Contributor

@HansMuller HansMuller left a comment

Choose a reason for hiding this comment

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

LGTM

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

a: desktop Running on desktop framework flutter/packages/flutter repository. See also f: labels. platform-mac Building on or for macOS specifically

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants