Skip to content

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
@fluttergithubbot fluttergithubbot added the tool Affects the "flutter" command-line tool. See also t: labels. label 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. tool Affects the "flutter" command-line tool. See also t: labels. 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

@gspencergoog gspencergoog merged commit 245d1b5 into flutter:master Nov 27, 2019
@gspencergoog gspencergoog deleted the add_macos_platform branch January 16, 2020 22:13
gspencergoog added a commit that referenced this pull request Jan 17, 2020
This contains the test changes for adding TargetPlatform.macOS, which was done in #43457.

The main goal of this PR is to enable tests in the material library that are currently running only on iOS to also run on macOS, but only for the tests where that makes sense. For instance, we don't run any of the haptic feedback tests on macOS.
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 2, 2021
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