[docs] Clarify createTheme warning for future compatibility
#46476
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.
Closes #46418
What
This PR improves the warning message in the theming documentation related to the usage of
createTheme()with multiple arguments.The original message says:
However, in practice,
createTheme()currently supports multiple arguments due to internal deep merging, which can confuse developers who observe behavior that contradicts the warning.Why
The updated warning:
This resolves confusion raised in #46418, where users expected the function to reject multiple arguments based on the wording, but observed that it worked in practice.
How
Updated the
:::warningblock in:docs/data/material/customization/theming/theming.mdNew content explicitly explains:
Final
Developers will now see a clearer, forward-looking warning that helps them avoid depending on potentially deprecated behavior.