Font Style
Toggle between italic and normal text style using simple class names.
On this page
typography/font_style
The live demo is not available for this example.
font_style.dart
View source
WText('Italic Text', className: 'italic');
WText('Normal Text', className: 'not-italic');
Basic Usage#
Apply italic to make text italicized, or not-italic to reset it to the normal font style:
WText('Important note', className: 'italic text-gray-700 dark:text-gray-300');
WText('Regular text', className: 'not-italic');
Quick Reference#
| Class | Flutter FontStyle |
Description |
|---|---|---|
italic |
FontStyle.italic |
Renders text in italic. |
not-italic |
FontStyle.normal |
Resets text to normal style. |
Responsive Design#
Combine with breakpoint prefixes to apply italic only at certain screen sizes:
WText('Responsive italic', className: 'not-italic md:italic');
Related Documentation#
- Font Size — set text size.
- Font Weight — control text thickness.
- Text Decoration — underline, overline, and strikethrough.