Skip to content

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

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

Feature Request: UI: Change "default" font family #49

Closed
henry2man opened this issue Jun 17, 2021 · 0 comments
Closed

Feature Request: UI: Change "default" font family #49

henry2man opened this issue Jun 17, 2021 · 0 comments
Labels
feature New feature or request

Comments

@henry2man
Copy link

henry2man commented Jun 17, 2021

Is your feature request related to a problem?

Yes, I want a simple way to change the default font family "Avenir". Currently this task involves the extension of a lot of text styles, even using DefaultChatTheme.

What solution would you suggest?

The ideal solution could be make dynamic DefaultChatTheme, allowing a new parameter called defaultFontFamily (original, isn't it?). Maybe we could configure some sort of a defaultTextStyle that is used later by the specific styles using defaultTextStyle.copyWith().

Is there any additional solution to that?

I've been trying to do my own implementation in a fork but I cannot see any "one-shot" solution. Maybe a full rewrite of chat_theme.dart will be required.

Extras

Screenshots or videos 📸
N/A

Code snippets 📝

Actual code needed for change all fonts:

DefaultFontFamily def = DefaultFontFamily();

String customFontFamily = 'Arial';

DefaultFontFamily(
...
dateDividerTextStyle: def.dateDividerTextStyle.copyWith(fontFamily:customFontFamily),
emptyChatPlaceholderTextStyle: def.emptyChatPlaceholderTextStyle.copyWith(fontFamily:customFontFamily),
inputTextStyle: def.inputTextStyle.copyWith(fontFamily:customFontFamily),
receivedMessageBodyTextStyle: def.receivedMessageBodyTextStyle.copyWith(fontFamily:customFontFamily),
receivedMessageCaptionTextStyle: def.receivedMessageCaptionTextStyle.copyWith(fontFamily:customFontFamily),
receivedMessageLinkDescriptionTextStyle: def.receivedMessageLinkDescriptionTextStyle.copyWith(fontFamily:customFontFamily),
receivedMessageLinkTitleTextStyle: def.receivedMessageLinkTitleTextStyle.copyWith(fontFamily:customFontFamily),
sentMessageBodyTextStyle: def.sentMessageBodyTextStyle.copyWith(fontFamily:customFontFamily),
sentMessageCaptionTextStyle: def.sentMessageCaptionTextStyle.copyWith(fontFamily:customFontFamily),
sentMessageLinkDescriptionTextStyle: def.sentMessageLinkDescriptionTextStyle.copyWith(fontFamily:customFontFamily),
sentMessageLinkTitleTextStyle: def.sentMessageLinkTitleTextStyle.copyWith(fontFamily:customFontFamily),
userAvatarTextStyle: def.userAvatarTextStyle.copyWith(fontFamily:customFontFamily),
userNameTextStyle: def.userNameTextStyle.copyWith(fontFamily:customFontFamily),
...
);

Related issues/PRs

N/A

@henry2man henry2man added the feature New feature or request label Jun 17, 2021
@flyerhq flyerhq locked and limited conversation to collaborators Aug 31, 2021

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

Labels
feature New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants