Home > Blockchain >  What collection of BoxDecoration's boxShadow property means?
What collection of BoxDecoration's boxShadow property means?

Time:09-27

There is a propery boxShadow in BoxDecoration. It can contains more than one item of shadow. So what does each of one means? How many items it can contains? What difference having one, two, three etc items?

CodePudding user response:

Let's take an example of a box on the table, the number of boxShadow items is similar to number of lights approaching to that box, casting shadows. One item in boxShadow list means only one shadow (like only one light is casting shadow). Two items will allow you to add another shadow from different perspective like two different lights are approaching, casting multiple shadows from different offsets.

CodePudding user response:

Basically Box shadow have these properties

  1. opacity

  2. x offset

  3. y offset

  4. blur radius

  5. spread radius

  6. color

    so lets discuss first Opacity thats make Container transparent so you can adjust it by its value.

Offset basically control where the shadow will be visible. you can show the shadow vertically or horizontally by x offset or y offset

so color property decide what will be color of the shadow

spreadRadius This property also takes in a double value as the object to decide the extent to which the box should be inflated before applying the blur.

blur This property takes in a double value as the object. It controls the blur-radius in terms of sigma instead of logical pixels.

  • Related