Avatar
Last updated
Last updated
Click on Add Widget Button and Select the Avatar widget from the list or add it directly from the widget tree.
In the Avatar widget, the shape property allows the selection between a circular or square shape for the box surrounding the avatar image.
The radius property in the Avatar widget enables the specification of the circle's radius.
In the image source property of the Avatar widget, we input the image URL when extracting it from a network, or alternatively, we utilize images stored in the assets. Initially, we add the image to the assets.
None: It positions the child at the center of the parent by default and removes any parts of the child that extend beyond the parent's boundaries.
Fill: The child completely occupies the parent's box, but this might cause the child's original shape to change.
Contain: It adjusts its child to occupy as much space as it can within the parent widget's boundaries without going beyond them.
Cover: It minimizes the child's size to fit within the parent widget's boundaries while ensuring that the child remains completely covered.
Fit Height : It ensures that the child occupies the entire height of the parent, allowing the child to extend beyond the parent's boundaries horizontally, while still preserving its original shape.
Fit Width: It ensures that the child occupies the entire width of the parent, allowing the child to extend beyond the parent's boundaries vertically, while still preserving its original shape.
Scale Down: It overrides the property that we set or scale down the properties.
The Text widget is used to show text on the screen. It is one of the most frequently used widgets.