Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Koallider/image_gradient_flutter

Open more actions menu

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

23 Commits
23 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

image_gradient

This package can be used to apply gradient to image in Flutter.

The best usecase is to apply colors to grayscale images. For example light beams.

Demo

Live Demo

image

Installation

dependencies:
  ...
  image_gradient: ^0.0.2

Usage

ImageGradient(
  image: Image.asset("assets/light.png"),
  gradient: const RadialGradient(colors: [Colors.deepOrange, Colors.purpleAccent]),
)

Alternative constructors

Linear Gradient

ImageGradient.linear(
  image: Image.asset("assets/light.png"),
  colors: const [Colors.yellow, Colors.pinkAccent],
)

Radial Gradient

ImageGradient.radial(
  image: Image.asset("assets/light.png"),
  colors: const [Colors.yellow, Colors.pinkAccent],
)

Sweep Gradient

ImageGradient.sweep(
  image: Image.asset("assets/light.png"),
  colors: const [Colors.yellow, Colors.pinkAccent],
)

About

Widget to apply gradient to image in Flutter.

Topics

Resources

Stars

Watchers

Forks

Used by

Contributors

Languages

Morty Proxy This is a proxified and sanitized view of the page, visit original site.