iconAlignment property
final
Determines the alignment of the icon within the widgets such as:
- ElevatedButton.icon,
- FilledButton.icon,
- FilledButton.tonalIcon.
- OutlinedButton.icon,
- TextButton.icon,
The effect of iconAlignment
depends on TextDirection. If textDirection is
TextDirection.ltr then IconAlignment.start and IconAlignment.end align the
icon on the left or right respectively. If textDirection is TextDirection.rtl the
the alignments are reversed.
Defaults to IconAlignment.start.
This sample demonstrates how to use
link
iconAlignment
to align the button icon to the start
or the end of the button.
To create a local project with this code sample, run:
flutter create --sample=material.IconAlignment.1 mysample
Implementation
final IconAlignment iconAlignment;