Repository navigation
Add a platform field to Theme - #5024
Merged
Merged
Conversation
Contributor
Author
Contributor
There was a problem hiding this comment.
Did you mean this to be /// ?
Contributor
There was a problem hiding this comment.
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?
Contributor
Author
There was a problem hiding this comment.
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.
Contributor
|
LGTM |
| 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; |
Contributor
There was a problem hiding this comment.
this should gets its value from a getter in foundation/platform.dart
Contributor
There was a problem hiding this comment.
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)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
We'll use this field to adapt material widgets to iOS.