inwardsshadowcontainer 1.0.1 copy "inwardsshadowcontainer: ^1.0.1" to clipboard
inwardsshadowcontainer: ^1.0.1 copied to clipboard

Allows to add shadows to any side of a Widget

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.

InnerShadow

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),
)

InnerShadow2

Additional Information #

  • directions towards corners possible
  • transparent, so mixing possible
  • stackable (look example_showcase.dart for an example)

ShadowInverts

1
likes
130
points
21
downloads

Publisher

unverified uploader

Weekly Downloads

Allows to add shadows to any side of a Widget

Repository (GitHub)
View/report issues

Documentation

API reference

License

BSD-2-Clause (license)

Dependencies

flutter

More

Packages that depend on inwardsshadowcontainer