linear_gradient 0.1.8

  • Readme
  • Changelog
  • Example
  • Installing
  • 74

linear_gradient #

Linear gradient with 300+ different color combination. Also, it will options for change gradient orientation Vertical and Horizontal.

Feedback and Pull Requests are most welcome!

Installation #

Add to pubspec.yaml.

dependencies:
  ...
  linear_gradient: ^0.1.8

How to use. #

import custom_gradient.dart

import 'package:linear_gradient/linear_gradient.dart';

Usage Example. #

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)),
      ),
    );
  }
}

Screenshot #

Gradient Orientation. #

LinearGradientStyle.ORIENTATION_HORIZONTAL
LinearGradientStyle.ORIENTATION_VERTICAL

Gradient Type (300+ Type are available). #

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

Video #

Watch Video

0.1.8 #

  • Update README.

0.1.7 #

  • Added Screenshot in README.

0.1.6 #

  • Added Documents.
  • Update README file.

0.1.5 #

  • Added new gradients.
  • Update README file.

0.1.4 #

  • Added new gradients.
  • Removed unused file and code.

0.1.3 #

  • Added new gradients.
  • Minor bug fix.

0.1.2 #

  • Updated README file.

0.1.1 #

  • Updated README file.

0.1.0 #

  • Published Initial Version.

example/main.dart

import 'package:flutter/material.dart';
import 'package:linear_gradient/src/linear_gradient_style.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)),
      ),
    );
  }
}

Use this package as a library

1. Depend on it

Add this to your package's pubspec.yaml file:


dependencies:
  linear_gradient: ^0.1.8

2. Install it

You can install packages from the command line:

with Flutter:


$ flutter pub get

Alternatively, your editor might support flutter pub get. Check the docs for your editor to learn more.

3. Import it

Now in your Dart code, you can use:


import 'package:linear_gradient/linear_gradient.dart';
  
Popularity:
Describes how popular the package is relative to other packages. [more]
49
Health:
Code health derived from static analysis. [more]
99
Maintenance:
Reflects how tidy and up-to-date the package is. [more]
100
Overall:
Weighted score of the above. [more]
74
Learn more about scoring.

We analyzed this package on Oct 16, 2019, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.5.1
  • pana: 0.12.21
  • Flutter: 1.9.1+hotfix.4

Platforms

Detected platforms: Flutter

References Flutter, and has no conflicting libraries.

Health issues and suggestions

Document public APIs. (-0.91 points)

336 out of 337 API elements have no dartdoc comment.Providing good documentation for libraries, classes, functions, and other API elements improves code readability and helps developers find and use your API.

Dependencies

Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.1.0 <3.0.0
flutter 0.0.0
Transitive dependencies
collection 1.14.11 1.14.12
meta 1.1.7
sky_engine 0.0.99
typed_data 1.1.6
vector_math 2.0.8
Dev dependencies
flutter_test