Skip to content

This is a demo for add shadow to Icon and Image in flutter

Notifications You must be signed in to change notification settings

AbirAhsan/flutter_Icon-Image_shadow

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

fluttertest

A new Flutter demo project for Icon and Image shadow.

Getting Started

For Icon's Shadow You can use IconShadowWidget().

Screenshot_2020-06-12-00-00-15-655_com example fluttertest

How to use:

1. add dependencies to pubspec.yaml:

 icon_shadow: ^1.0.1

2. Import your Dart code :

import 'package:icon_shadow/icon_shadow.dart';

3. add icons:

Center(
            child: Row(
              mainAxisAlignment: MainAxisAlignment.spaceEvenly,
              children: <Widget>[
        IconShadowWidget(
          Icon(
            Icons.add_circle,
            color: Colors.red,
            size: 100.0,
          ),
        ),
        IconShadowWidget(
          Icon(
            Icons.add_circle,
            color: Colors.red,
            size: 100.0,
          ),
          shadowColor: Colors.black,
        ),
        IconShadowWidget(
          Icon(
            Icons.add_circle,
            color: Colors.red,
            size: 100.0,
          ),
          shadowColor: Colors.black,
          showShadow: false,
        ),
              ],
            ),
          ),

And for Image shadow you can use this code-

Container(
  decoration: BoxDecoration(
    boxShadow: [
      BoxShadow(
        color: Colors.grey.withOpacity(0.8),
        spreadRadius: 5,
        blurRadius: 3,
        offset: Offset(5, 7), // changes position of shadow
      ),
    ],
  ),
  child: Image.asset("assets/images/download.png"),
)

About

This is a demo for add shadow to Icon and Image in flutter

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published