Linear gradient with 300+ different color combination. Also, it will options for change gradient orientation Vertical and Horizontal. Now you can use Gradients style color as theme. By using getColorCombination() to get Gradients color list by passing gradient type.
Feedback and Pull Requests are most welcome!
Add to pubspec.yaml.
dependencies:
linear_gradient: ^0.1.12
import custom_gradient.dart
import 'package:linear_gradient/linear_gradient.dart';
import 'package:flutter/material.dart';
import 'package:linear_gradient/linear_gradient.dart';
void main() => runApp(MyApp());
class MyApp extends StatelessWidget {
/// This is an example app which make use of
/// How to use Custom Gradient Box Decoration
@override
Widget build(BuildContext context) {
return MaterialApp(
home: Container(
decoration: BoxDecoration(
gradient: LinearGradientStyle.linearGradient(
orientation: LinearGradientStyle.ORIENTATION_HORIZONTAL,
gradientType: LinearGradientStyle.GRADIENT_TYPE_AMIN)),
),
);
}
}
LinearGradientStyle.ORIENTATION_HORIZONTAL
LinearGradientStyle.ORIENTATION_VERTICAL
Here is Some Examples.
LinearGradientStyle.GRADIENT_TYPE_GRADE_GREY
LinearGradientStyle.GRADIENT_TYPE_PIGGY_PINK
LinearGradientStyle.GRADIENT_TYPE_COOL_BLUES
LinearGradientStyle.GRADIENT_TYPE_MEGATRON
LinearGradientStyle.GRADIENT_TYPE_MOONLIT_ASTEROID.
LinearGradientStyle.GRADIENT_TYPE_JSHINE
LinearGradientStyle.GRADIENT_TYPE_EVENING_SUNSHINE.
LinearGradientStyle.GRADIENT_TYPE_DARK_OCEAN
LinearGradientStyle.GRADIENT_TYPE_COOL_SKY
LinearGradientStyle.GRADIENT_TYPE_YODA
LinearGradientStyle.GRADIENT_TYPE_MEMARIANI
List<Color> colorCombination = LinearGradientStyle.getColorCombination(
gradientType: LinearGradientStyle.GRADIENT_TYPE_ROYAL);