-
Notifications
You must be signed in to change notification settings - Fork 238
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
38 additions
and
1 deletion.
There are no files selected for viewing
This file contains 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
This file contains 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
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
# Text Style with Tabular Figures | ||
|
||
Did you know? | ||
|
||
If you want to render fixed width (monospaced) digits, set FontFeature.tabularFigures() inside your TextStyle. 🎯 | ||
|
||
This works great when showing numbers and dates that should align vertically or update in realtime! 🔥 | ||
|
||
![](218.png) | ||
|
||
<!-- | ||
Text( | ||
currentTimeFormatted, | ||
style: const TextStyle( | ||
// Set this font feature to ensure all digits are rendered with a fixed width (monospace) | ||
// Useful when showing numbers or dates that update in realtime | ||
fontFeatures: [FontFeature.tabularFigures()], | ||
fontFamily: "Roboto", | ||
fontSize: 48, | ||
fontWeight: FontWeight.w700, | ||
), | ||
) | ||
--> | ||
|
||
--- | ||
|
||
| Previous | Next | | ||
| -------- | ---- | | ||
| [Digits Separators in Dart 3.6](../0217-digits-separators/index.md) | | | ||
|
||
|
||
<!-- TWITTER|https://x.com/biz84/status/1868692579648487611 --> | ||
<!-- LINKEDIN|https://www.linkedin.com/posts/andreabizzotto_did-you-know-if-you-want-to-render-fixed-activity-7274458459914350593-YkSx --> | ||
<!-- BLUESKY|https://bsky.app/profile/codewithandrea.com/post/3ldgqe64qzs24 --> |