Skip to content
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

Add support to set the icon title using a widget #46

Open
RaphaelRevivor opened this issue May 22, 2024 · 0 comments
Open

Add support to set the icon title using a widget #46

RaphaelRevivor opened this issue May 22, 2024 · 0 comments

Comments

@RaphaelRevivor
Copy link

Hi,

I would like to request a feature, that is to support setting the icon title using a widget.
Use case:
I would like to add a countdown next to the icon, that changes according to the remaining time. Since the width of the numbers are different, using the current method:
// Sets the title for this tray icon.
setTitle(String title) → Future<void>
will cause the icon and the title to move constantly.
If I can set the title using a widget, then I can control the text to be constant width, that way it won't move.
Please also let me know if there is any other solution using the current method.

Thanks,
Raphael


你好,
我这边有一个需求,希望能够用一个widget来设置icon title。
用例:
我想在icon旁边加一个倒计时,显示当前计时剩余时间。由于各个数字的宽度不同,使用当前的函数:
// Sets the title for this tray icon.
setTitle(String title) → Future<void>
会导致icon和title一直不停的移动(抖动)。
如果能够用一个widget来设置icon title,那我就可以限定这个widget的宽度,那它就不会抖动了。
此外,如果用现有函数已经有成熟的解决方案,也欢迎告诉我!

感谢!
Raphael

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant