Skip to content

lalitjarwal/shadowed_image

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Package for creating shadow of same color scheme as the image.

Example

Installation

  1. Add this to your package's pubspec.yaml file:
dependencies:
  shadowed_image: ^latest
  1. Import the package into your dart file:
import 'package:shadowed_image/shadowed_image.dart';

Usage

import 'package:shadowed_image/shadowed_image.dart';
import 'package:flutter/material.dart';

void main() => runApp(AppBody());

class _AppBodyState extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
          home: Scaffold(
        body: ShadowedImage(image: Image.asset('assets/images/download.jpg'))
      ),
    );
  }
}

Properties

1. Key key
 
2. double scale  // Size to parent. 

3. Offset offset  // Position of shadow. Takes 2 arguments- first one (dx) for horizontal component and second (dy) for vertical component.

4. double blurRadius // Amount of blur in the shadow. 0 means no blur.

5. Image image (@required) // The image.

Note

*If scale provided then offset should not be unchanged.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages