bilinear_gradient 0.0.1+1 copy "bilinear_gradient: ^0.0.1+1" to clipboard
bilinear_gradient: ^0.0.1+1 copied to clipboard

A container that allows you to wrap your widgets within a 4 colors gradient.

Bilinear Gradient #

Features #

This package will allow you to draw the BilinearGradientDecorator widget, as LinearGradient is already built in with Flutter.

Example view

But don't confuse the Container's LinearGradient with the BilinearGradientDecorator, since the former is an attribute of a Container's decoration, while the latter is a stand alone Widget.

Usage #

import 'package:bilinear_gradient/bilinear_gradient.dart';
...

const topLeftColor = Color(0xFFF7F700);
const topRightColor = Color(0xFF00F700);
const bottomLeftColor = Color(0xFF7675C3);
const bottomRightColor = Color(0xFFF70075);

...
child: BilinearGradientDecorator(
        topLeftColor: topLeftColor,
        topRightColor: topRightColor,
        bottomLeftColor: bottomLeftColor,
        bottomRightColor: bottomRightColor,
        child: Center(
            child: DecoratedText('Bilinear Gradient')
        ),
    )
...

Additional information #

  • Tested on Android/iOS/macOS with Flutter 3.7.0. Web did't worked on that version;
  • Tested again in with Flutter 3.10.5. Everything work just fine at this time.
3
likes
160
points
3
downloads

Publisher

unverified uploader

Weekly Downloads

A container that allows you to wrap your widgets within a 4 colors gradient.

Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (license)

Dependencies

flutter, flutter_shaders

More

Packages that depend on bilinear_gradient