![Flutter Image Decoration Misplaced Stack Overflow](https://i.pinimg.com/originals/ba/be/e9/babee901ae6144048377e12530271639.jpg)
Unfortunately there is no elevation property for container you need to use other widget such as card but if you really do want to give container an elevation property you could take a look at division and watch this tutorial about using that package.
Flutter box decoration elevation. See boxconstraints for an introduction to box layout models. If it is a rectangle then the borderradius property controls the roundness of the corners. During painting the container first applies the given transform. The container is then surrounded by additional empty space described from the margin.
Container tries in order. The shape of the box can be a circle or a rectangle. Most likely the other items in your listview are covering up your manually drawn shadow because it s being drawn outside the bounds of your container. To honor alignment to size itself to the child to honor the width height and constraints to expand to fit the parent to be as small.
In flutter the base class for creating shape outlines is shapeborder there are some classes that extends it which include stadiumborder beveledrectangleborder continuousrectangleborder roundedrectangleborder circleborder and boxborder. Implementation final double elevation. The value is non negative. You can get a natural looking material shadow using the elevation constructor.
Themedata applyelevationoverlaycolor which controls the whether an overlay color will be applied to indicate elevation. This tutorial shows you how to use flutter s boxborder which is used as the decoration property of container widget. The boxdecoration class provides a variety of ways to draw a box. The box has a border a body and may cast a boxshadow.
Since container combines a number of other widgets each with their own layout behavior container s layout behavior is somewhat complicated. The shape of the box can be a circle or a rectangle. The bottom most layer is the color. If it is a rectangle then the borderradius property controls the roundness of the corners.
I would recommend that you use a card instead of a container. A dashed container plugin for flutter image assets using box decoration part 3 flutter tutorial planets flutter creating a planet card whats people lookup in this blog. The body of the box is painted in layers. Color which may have an elevation overlay applied.
A container first surrounds the child with padding inflated by any borders present in the decoration and then applies additional constraints to the padded extent incorporating the width and height as constraints if either is non null. Simple to use yet powerfull style widgets with syntax inspired by css. The body of the box is painted in layers.