FLUTTER ECOSYSTEM

lalitjarwal/shadowed_image

lalitjarwal/shadowed_image open-source repository details.

shadowed_image 프로젝트 이미지
Stars
3
Forks
0
최근 푸시(UTC)
2021. 3. 9.
프로젝트 상태
활성
Lalit Jarwal GitHub avatar
GITHUB User

Lalit Jarwal ↗

언어Dart

이 저장소가 배포한 패키지

사용 중인 의존성

의존성 목록 2 개
  • flutter{"sdk":"flutter"}
  • flutter_test개발 의존성{"sdk":"flutter"}

원본 README

아래는 영문 원문 스냅샷입니다. 최신 내용은 GitHub에서 확인하세요.

README 펼치기 / 접기

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.