-
Notifications
You must be signed in to change notification settings - Fork 29.7k
[Material] Implement TooltipTheme and Tooltip.textStyle, update Tooltip defaults #36856
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Conversation
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
…property Not documented yet, still needs tests for TooltipTheme.
HansMuller
approved these changes
Jul 25, 2019
Contributor
HansMuller
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
johnsonmh
pushed a commit
to johnsonmh/flutter
that referenced
this pull request
Jul 30, 2019
…ip defaults (flutter#36856) * Implement TooltipThemeData and TooltipTheme * Add text style property * Updated tooltip default colors for light and dark theme to match Material specification
|
Has tooltip textStyle disappeared in new Flutter versions? I don't seem to find this available in v1.7.8 |
|
Disregard my previous comment, just realized 1.7.8 was not the last version. Updated to 1.9.2 and it works fine now. Thanks! |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Labels
c: API break
Backwards-incompatible API changes
c: new feature
Nothing broken; request for a new capability
f: material design
flutter/packages/flutter/material repository.
framework
flutter/packages/flutter repository. See also f: labels.
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.
Description
Re-attempt #36030, fixing misunderstanding of debugLabel and updating accordingly.
Updates from previous attempt are as follows:
debugLabel no longer replaces "black" with "white" and vice versa, but instead correctly reflects the history of mutations made to the TextStyle
https://github.com/flutter/flutter/pull/36856/files#diff-2c8a7ca0f8585eb93a5940b5f832bea5R341
https://github.com/flutter/flutter/pull/36856/files#diff-2c8a7ca0f8585eb93a5940b5f832bea5R349
Tests for debugLabel were updated accordingly:
https://github.com/flutter/flutter/pull/36856/files#diff-0f32d5c2e77a0a6dd50c3e92e9187420R446
https://github.com/flutter/flutter/pull/36856/files#diff-0f32d5c2e77a0a6dd50c3e92e9187420R472
Note: Screenshot sizes differ because of how I took the screenshots, all tooltips are the same size in these images.
textStyleproperty, granting more fine-grained control to developers to update the tooltip's text message.decorationto the following:textStyleto the following:Tooltip Before Breaking change:


Tooltip After Breaking change:


Related Issues
Fixes #35513
Related to #33654
Related to #25844
Tests
I added the following tests:
Several tests verifying passing down of TooltipTheme properties (color, location, height, decoration, semantics, show and wait durations to reveal and hide tooltip)
Tests for textStyle implementation
Test to verify debugLabel for light and dark theme
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.///).flutter analyze --flutter-repo) does not report any problems on my PR.Breaking Change
Does your PR require Flutter developers to manually update their apps to accommodate your change?