Usage
This widget can be used to cast shadows onto its child. Color, extend and intensity of the shadow can be adjusted. The following shows an example of an empty container with shadows applied to it.
Getting started
Simply include, copy or use the shadowcontainer.dart into your project and call it via SideShadow to add shadow to your widget.
Example
This example shows how the easiest to build inwards shadow, casted onto a SizedBox.
const SideShadow(
shadowColor: Colors.black, //Color of the shadow
beginAlignment: Alignment.topCenter, //Starting Alignment
endAlignment: Alignment.bottomCenter, //Ending Alignment
maxIntensity: 0.5, //Maximum opacity of the shadow
indent: 0.1, //The maximum extend of the shadow
//0.1 means 10% of the childs size
child: SizedBox(
width: 300,
height: 300),
)
Additional Information
- directions towards corners possible
- transparent, so mixing possible
- stackable (look example_showcase.dart for an example)