Skip to content

Conversation

@CatHood0
Copy link
Collaborator

@CatHood0 CatHood0 commented Jan 19, 2025

Description

Fix issue where the customStyleBuilder does not accumulate styles when multiple attributes are applied to the same text.

Related Issues

Fix #2425

  • Feature: New functionality without breaking existing features.
  • 🛠️ Bug fix: Resolves an issue without altering current behavior.
  • 🧹 Refactor: Code reorganization, no behavior change.
  • Breaking: Alters existing functionality and requires updates.
  • 🧪 Tests: New or modified tests
  • 📝 Documentation: Updates or additions to documentation.
  • 🗑️ Chore: Routine tasks, or maintenance.
  • Build configuration change: Build/configuration changes.

@CatHood0 CatHood0 self-assigned this Jan 19, 2025
@CatHood0 CatHood0 marked this pull request as draft January 19, 2025 19:29
@CatHood0
Copy link
Collaborator Author

@manudicri can you test if these changes fix your issue? I cannot really reproduce your issue, but i think that, with these changes, it could be fixed.

Comment on lines -13 to +14
typedef CustomStyleBuilder = TextStyle Function(Attribute attribute);
typedef CustomStyleBuilder = TextStyle Function(
Attribute attribute, TextStyle style);
Copy link
Collaborator

Choose a reason for hiding this comment

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

Isn't this a breaking change if this is a public API?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Mmm... Probably. It's difficult without change the CustomStyleBuilder. I'm waiting for the response of @manudicri to know if i need to made more changes.

@CatHood0 CatHood0 added bug Something isn't working in progress This issue or feature is currently being worked on by someone. minor Minimal impact or cosmetic issue. Can be resolved at a later time without affecting overall function awaiting response Pending additional information or feedback from the issue creator labels Jan 20, 2025
@manudicri
Copy link

Hi @CatHood0 ,
I think it could be fine, so I can add my custom styles by adding them to the TextStyle (even though I have to use .copyWith, I don't know if that could work).
Anyway, It's not urgent to me anymore since I found another workaround, but I thought it could be a problem to someone else, too.

@CatHood0 CatHood0 assigned CatHood0 and unassigned CatHood0 Jan 24, 2025
@CatHood0 CatHood0 removed the awaiting response Pending additional information or feedback from the issue creator label Jan 24, 2025
@CatHood0
Copy link
Collaborator Author

Ok, i will remove the current style property

@CatHood0 CatHood0 closed this Feb 17, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working in progress This issue or feature is currently being worked on by someone. minor Minimal impact or cosmetic issue. Can be resolved at a later time without affecting overall function

Projects

None yet

Development

Successfully merging this pull request may close these issues.

customStyleBuilder Does Not Accumulate Styles for Multiple Attributes

3 participants