Skip to content

Add a platform field to Theme - #5024

Merged
abarth merged 1 commit into
flutter:masterfrom
abarth:theme_platform
Jul 25, 2016
Merged

abarth merged 1 commit into
flutter:masterfrom
abarth:theme_platform

Conversation

@abarth

@abarth abarth commented Jul 25, 2016

Copy link
Copy Markdown
Contributor

We'll use this field to adapt material widgets to iOS.

@abarth

abarth commented Jul 25, 2016

Copy link
Copy Markdown
Contributor Author

@Hixie @HansMuller

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Did you mean this to be /// ?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Fixed.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Do we want suffixes here? Or maybe we're just assuming that the adaptation matches whatever the current version of the platform was when Flutter was built?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

We can always introduce another "version" enum if we want to get more specific in our targetting.

We'll use this field to adapt material widgets to iOS.
@HansMuller

Copy link
Copy Markdown
Contributor

LGTM

@abarth
abarth merged commit 5717cd5 into flutter:master Jul 25, 2016
@abarth
abarth deleted the theme_platform branch July 25, 2016 19:58
primaryTextTheme ??= primaryIsDark ? Typography.white : Typography.black;
iconTheme ??= isDark ? const IconThemeData(color: Colors.white) : const IconThemeData(color: Colors.black);
primaryIconTheme ??= primaryIsDark ? const IconThemeData(color: Colors.white) : const IconThemeData(color: Colors.black);
platform ??= (Platform.isIOS || Platform.isMacOS) ? TargetPlatform.iOS : TargetPlatform.android;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

this should gets its value from a getter in foundation/platform.dart

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

and that getter should throw an exception saying that a new enum should be added if it's a new platform

chinmaygarde added a commit to chinmaygarde/flutter that referenced this pull request Apr 17, 2018
This roll includes the following engine commits:

* flutter-team-archive/engine@0c09bf03: In the service protocol, if no view is specified to flush tasks on, pick the first one. (flutter#5028)
* flutter-team-archive/engine@ecaefd7a: Roll src/third_party/skia/ 276886160..1cd6098d5 (50 commits) (flutter#5026)
* flutter-team-archive/engine@e6545573: Enable 'Speak Screen' and 'Switch Control' for iOS (flutter#5016)
* flutter-team-archive/engine@3393c179: Fix Android platform channels (flutter#5025)
* flutter-team-archive/engine@1bc0e1bb: On windows, refer to Dart snapshot directly executable. (flutter#5024)
* flutter-team-archive/engine@cf6ca32d: Revert "Roll Dart to fe606f890b0a311da802c78b0af414a3c2087a79" (flutter#5023)
* flutter-team-archive/engine@4b45a53e: Only make ERROR and FATAL log levels visible by default. (flutter#5022)
* flutter-team-archive/engine@98f6c2d5: Fix shell launcher test (dart2 compliant and stop polling) (flutter#5009)
* flutter-team-archive/engine@75851f08: Roll Dart to fe606f890b0a311da802c78b0af414a3c2087a79 (flutter#5020)
* flutter-team-archive/engine@9495a52d: On iOS, try to use ES3, then fall back to ES2. (flutter#5006)
* flutter-team-archive/engine@d6d4eec2: Fix broken Linux build (flutter#5019)
* flutter-team-archive/engine@d15dc76e: Fix broken Chromebot build (flutter#5018)
* flutter-team-archive/engine@c17a6290: Breadcrumbs to the wiki (flutter#5017)
* flutter-team-archive/engine@4eaf2c2f: Return raw (unencoded) bytes in Image.toByteData() (flutter#5008)
* flutter-team-archive/engine@d812a617: Roll src/third_party/skia/ e669bdfad..276886160 (9 commits) (flutter#5014)
* flutter-team-archive/engine@62aeab72: Call SkSurface::flush instead of getting a backend handle in vulkan_swapchain. (flutter#5012)
* flutter-team-archive/engine@f4ebb180: Roll src/third_party/skia/ 3462eb034..e669bdfad (54 commits) (flutter#5007)
* flutter-team-archive/engine@0b7d6be9: Re-land "do not pause rendering when android view loses focus" (flutter#5004)
* flutter-team-archive/engine@91dee598: If the rasterizer has a valid surface context, use that to create a snapshotting render target. (flutter#4979)
* flutter-team-archive/engine@570231b7: Specify the packages file path when running engine dart tests. (flutter#5005)
* flutter-team-archive/engine@0b9cef5a: Minor update to README (flutter#5003)
* flutter-team-archive/engine@c386418f: Promote line height in text style created from paragraph style (flutter#4995)
* flutter-team-archive/engine@4e0fbb6f: If the test specifies a .dill file, dont make the engine interpret is as source. (flutter#5002)
* flutter-team-archive/engine@58e84c8b: Re-land "Support multiple shells in a single process. (flutter#4932)" (flutter#4998)
* flutter-team-archive/engine@37e5df05: Remove only use of SkPaint::kGenA8FromLCD (flutter#4994)
* flutter-team-archive/engine@b7358b33: libtxt: cache font families that are remapped to the default font family (flutter#4990)
* flutter-team-archive/engine@a530035b: libtxt: fix leaks in Skia object reference counting (flutter#4988)
* flutter-team-archive/engine@0c74fc93: [fuchsia] Fix use-after-free (flutter#4987)
* flutter-team-archive/engine@b6d2dde9: [fuchsia] Fix build (flutter#4986)
* flutter-team-archive/engine@1dd12649: [async] Adapt to libasync API changes. (flutter#4980)
tvolkert pushed a commit that referenced this pull request Apr 17, 2018
This roll includes the following engine commits:

* flutter-team-archive/engine@0c09bf03: In the service protocol, if no view is specified to flush tasks on, pick the first one. (#5028)
* flutter-team-archive/engine@ecaefd7a: Roll src/third_party/skia/ 276886160..1cd6098d5 (50 commits) (#5026)
* flutter-team-archive/engine@e6545573: Enable 'Speak Screen' and 'Switch Control' for iOS (#5016)
* flutter-team-archive/engine@3393c179: Fix Android platform channels (#5025)
* flutter-team-archive/engine@1bc0e1bb: On windows, refer to Dart snapshot directly executable. (#5024)
* flutter-team-archive/engine@cf6ca32d: Revert "Roll Dart to fe606f890b0a311da802c78b0af414a3c2087a79" (#5023)
* flutter-team-archive/engine@4b45a53e: Only make ERROR and FATAL log levels visible by default. (#5022)
* flutter-team-archive/engine@98f6c2d5: Fix shell launcher test (dart2 compliant and stop polling) (#5009)
* flutter-team-archive/engine@75851f08: Roll Dart to fe606f890b0a311da802c78b0af414a3c2087a79 (#5020)
* flutter-team-archive/engine@9495a52d: On iOS, try to use ES3, then fall back to ES2. (#5006)
* flutter-team-archive/engine@d6d4eec2: Fix broken Linux build (#5019)
* flutter-team-archive/engine@d15dc76e: Fix broken Chromebot build (#5018)
* flutter-team-archive/engine@c17a6290: Breadcrumbs to the wiki (#5017)
* flutter-team-archive/engine@4eaf2c2f: Return raw (unencoded) bytes in Image.toByteData() (#5008)
* flutter-team-archive/engine@d812a617: Roll src/third_party/skia/ e669bdfad..276886160 (9 commits) (#5014)
* flutter-team-archive/engine@62aeab72: Call SkSurface::flush instead of getting a backend handle in vulkan_swapchain. (#5012)
* flutter-team-archive/engine@f4ebb180: Roll src/third_party/skia/ 3462eb034..e669bdfad (54 commits) (#5007)
* flutter-team-archive/engine@0b7d6be9: Re-land "do not pause rendering when android view loses focus" (#5004)
* flutter-team-archive/engine@91dee598: If the rasterizer has a valid surface context, use that to create a snapshotting render target. (#4979)
* flutter-team-archive/engine@570231b7: Specify the packages file path when running engine dart tests. (#5005)
* flutter-team-archive/engine@0b9cef5a: Minor update to README (#5003)
* flutter-team-archive/engine@c386418f: Promote line height in text style created from paragraph style (#4995)
* flutter-team-archive/engine@4e0fbb6f: If the test specifies a .dill file, dont make the engine interpret is as source. (#5002)
* flutter-team-archive/engine@58e84c8b: Re-land "Support multiple shells in a single process. (#4932)" (#4998)
* flutter-team-archive/engine@37e5df05: Remove only use of SkPaint::kGenA8FromLCD (#4994)
* flutter-team-archive/engine@b7358b33: libtxt: cache font families that are remapped to the default font family (#4990)
* flutter-team-archive/engine@a530035b: libtxt: fix leaks in Skia object reference counting (#4988)
* flutter-team-archive/engine@0c74fc93: [fuchsia] Fix use-after-free (#4987)
* flutter-team-archive/engine@b6d2dde9: [fuchsia] Fix build (#4986)
* flutter-team-archive/engine@1dd12649: [async] Adapt to libasync API changes. (#4980)
DaveShuckerow pushed a commit to DaveShuckerow/flutter that referenced this pull request May 14, 2018
This roll includes the following engine commits:

* flutter-team-archive/engine@0c09bf03: In the service protocol, if no view is specified to flush tasks on, pick the first one. (flutter#5028)
* flutter-team-archive/engine@ecaefd7a: Roll src/third_party/skia/ 276886160..1cd6098d5 (50 commits) (flutter#5026)
* flutter-team-archive/engine@e6545573: Enable 'Speak Screen' and 'Switch Control' for iOS (flutter#5016)
* flutter-team-archive/engine@3393c179: Fix Android platform channels (flutter#5025)
* flutter-team-archive/engine@1bc0e1bb: On windows, refer to Dart snapshot directly executable. (flutter#5024)
* flutter-team-archive/engine@cf6ca32d: Revert "Roll Dart to fe606f890b0a311da802c78b0af414a3c2087a79" (flutter#5023)
* flutter-team-archive/engine@4b45a53e: Only make ERROR and FATAL log levels visible by default. (flutter#5022)
* flutter-team-archive/engine@98f6c2d5: Fix shell launcher test (dart2 compliant and stop polling) (flutter#5009)
* flutter-team-archive/engine@75851f08: Roll Dart to fe606f890b0a311da802c78b0af414a3c2087a79 (flutter#5020)
* flutter-team-archive/engine@9495a52d: On iOS, try to use ES3, then fall back to ES2. (flutter#5006)
* flutter-team-archive/engine@d6d4eec2: Fix broken Linux build (flutter#5019)
* flutter-team-archive/engine@d15dc76e: Fix broken Chromebot build (flutter#5018)
* flutter-team-archive/engine@c17a6290: Breadcrumbs to the wiki (flutter#5017)
* flutter-team-archive/engine@4eaf2c2f: Return raw (unencoded) bytes in Image.toByteData() (flutter#5008)
* flutter-team-archive/engine@d812a617: Roll src/third_party/skia/ e669bdfad..276886160 (9 commits) (flutter#5014)
* flutter-team-archive/engine@62aeab72: Call SkSurface::flush instead of getting a backend handle in vulkan_swapchain. (flutter#5012)
* flutter-team-archive/engine@f4ebb180: Roll src/third_party/skia/ 3462eb034..e669bdfad (54 commits) (flutter#5007)
* flutter-team-archive/engine@0b7d6be9: Re-land "do not pause rendering when android view loses focus" (flutter#5004)
* flutter-team-archive/engine@91dee598: If the rasterizer has a valid surface context, use that to create a snapshotting render target. (flutter#4979)
* flutter-team-archive/engine@570231b7: Specify the packages file path when running engine dart tests. (flutter#5005)
* flutter-team-archive/engine@0b9cef5a: Minor update to README (flutter#5003)
* flutter-team-archive/engine@c386418f: Promote line height in text style created from paragraph style (flutter#4995)
* flutter-team-archive/engine@4e0fbb6f: If the test specifies a .dill file, dont make the engine interpret is as source. (flutter#5002)
* flutter-team-archive/engine@58e84c8b: Re-land "Support multiple shells in a single process. (flutter#4932)" (flutter#4998)
* flutter-team-archive/engine@37e5df05: Remove only use of SkPaint::kGenA8FromLCD (flutter#4994)
* flutter-team-archive/engine@b7358b33: libtxt: cache font families that are remapped to the default font family (flutter#4990)
* flutter-team-archive/engine@a530035b: libtxt: fix leaks in Skia object reference counting (flutter#4988)
* flutter-team-archive/engine@0c74fc93: [fuchsia] Fix use-after-free (flutter#4987)
* flutter-team-archive/engine@b6d2dde9: [fuchsia] Fix build (flutter#4986)
* flutter-team-archive/engine@1dd12649: [async] Adapt to libasync API changes. (flutter#4980)
@github-actions github-actions Bot locked as resolved and limited conversation to collaborators Aug 15, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants