Show selectedIcon, if it false it will show the normal icon. Null then it will behave as a toggle button. ![]() If isSelected is null it will behave as a normal button. To not break existing apps, the toggle feature can be optionally controlled Material Design 3 also treats IconButtons as toggle buttons. To create a outlined icon button, use IconButton.outlined. Use IconButton.filled to create a filled tonal icon button, use IconButton.filledTonal The default IconButton is the standard type. Material Design 3 introduced new types (standard and contained) of IconButtons. InkResponse contributed by descendant widgets.įlutter create -sample=material.IconButton.2 mysample The underlying Material along with the splash and highlight It's easy enough to create an icon button with a filled background In AppBar.actions are an example of this. On top of the parent widget's background. Icon buttons don't support specifying a background color or otherīackground decoration because typically the icon is just displayed Size, not 72, which may produce unexpected layouts and clipping ![]() If you do, the button's size will be based on the default icon Icon: const Icon(Icons.favorite, size: 72), Icon's size with its Icon.size parameter, use the icon button's When creating an icon button with an Icon, do not override the ![]() To create a local project with this code sample, run:įlutter create -sample=material.IconButton.1 mysample Icon sizes
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |