shadow

Last updated:

0 purchases

shadow Image
shadow Images
Add to Cart

Description:

shadow

shadow #

The easiest way to Apply Shadow to any widget, It aint much but it is an honest work
Get started #
Add dependency #
dependencies:
shadow: ^1.5.0
copied to clipboard
Install it #
You can install packages from the command line:
with pub:
$ pub get
copied to clipboard
with Flutter:
$ flutter pub get
copied to clipboard
Import it #
Now in your Dart code, you can use:
import 'package:shadow/shadow.dart';
copied to clipboard
Super simple to use #
Shadow(
child: FlutterLogo(size: 200),
)
copied to clipboard
Proprities #
Offset(dx,dy) : #
change the position of the shadow according to the widget position.
Opacity(double) : #
change the visibility of the shade from 1 to 0, 1 as fully visible and 0 not visible at all.
Scale(double) : #
this propritie is meant to change the size of the shadow (Shadow size onyl not the widget itself).

Examples #
Containers: #
Shadow(
child:
Container(
color:Colors.redAccent ,
height: 50,
width: 50,
),
),
copied to clipboard

Stacks: #
Shadow(
options: ShadowOptions(
offset: Offset(-10, -10),
),
child:
Stack(
children: <Widget>[
Container(
margin: EdgeInsets.only(top: 20),
color:Colors.redAccent ,
height: 150,
width: 150,
),
Container(
margin: EdgeInsets.only(left: 25),
decoration: BoxDecoration(
color: Colors.blue,
borderRadius: BorderRadius.all(Radius.circular(50)),
),
height: 50,
width: 100,
),
],
),
),
copied to clipboard

images(assets): #
Shadow(
options: ShadowOptions(
offset: Offset(-10, 0),
),
child:
Container(
margin: EdgeInsets.only(left: 100),
height: 320,
width: 350,
child: Center(
child: Stack(
children: <Widget>[
Container(
margin: EdgeInsets.only(bottom: 0,left: 12,top: 15),
height: 80,
width: 80,
child: Image.asset('assets/images/head.png')),
Container(
margin: EdgeInsets.only(top: 60),
height: 150,
width: 150,
child: Image.asset('assets/images/body.png')),
Container(
margin: EdgeInsets.only(top: 150),
height: 70,
width: 350,
child: Row(
children: <Widget>[
Image.asset('assets/images/wheel.png'),
SizedBox(width: 17,),
Image.asset('assets/images/wheel.png'),
],
)),
],
),
),
),

),

copied to clipboard

License:

For personal and professional use. You cannot resell or redistribute these repositories in their original state.

Customer Reviews

There are no reviews.