Skip to content

Latest commit

 

History

History
58 lines (42 loc) · 3.13 KB

README.md

File metadata and controls

58 lines (42 loc) · 3.13 KB

Smooth Gradient

Package Publisher MIT License LeanCode Style

smooth_gradient is a package that allows you to create linear gradients that use a specific curve.

Status Comments
flutter_smooth_gradient - Tests (stable) Current stable Flutter version
flutter_smooth_gradient - Tests (beta) Current beta Flutter version
flutter_smooth_gradient - Tests (3.24.0) The oldest supported Flutter version

A comparison of different gradient curves.

Getting started

  1. Add this package to your dependencies.
dependencies:
  smooth_gradient: latest_version
  1. Get the dependencies.
flutter pub get

Usage

Replace LinearGradient with a SmoothGradient and optionally provide a curve.

return DecoratedBox(
  decoration: BoxDecoration(
    gradient: SmoothGradient(
      from: Colors.black,
      to: Colors.white,
      // Defaults to `Curves.easeInOut`.
      curve: Curves.easeIn,
    ),
  ),
  child: const SizedBox.square(
    dimension: 100,
  ),
);

Additional information

Maintainers