linear_gradient_style 0.1.5

  • Readme
  • Changelog
  • Example
  • Installing
  • 11

flutter_gradient_box_decoration #

A Flutter plugin for iOS and Android for Linear gradient with 300+ different color combination.

Feedback and Pull Requests are most welcome!

Installation #

Add to pubspec.yaml.

dependencies:
  ...
  linear_gradient_style: ^0.1.5

How to use. #

import custom_gradient.dart

import 'linear_gradient.dart';

Usage Example. #

import 'package:flutter/material.dart';
import 'package:gradient_box_decoration/src/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: CustomGradient.linearGradient(
                orientation: CustomGradient.ORIENTATION_HORIZONTAL,
                gradientType: CustomGradient.GRADIENT_TYPE_AMIN)),
      ),
    );
  }
}

Gradient Orientation. #

CustomGradient.ORIENTATION_HORIZONTAL. CustomGradient.ORIENTATION_VERTICAL.

Gradient Type (300+ Type are available). #

Here is Some Examples.

CustomGradient.GRADIENT_TYPE_GRADE_GREY. CustomGradient.GRADIENT_TYPE_PIGGY_PINK. CustomGradient.GRADIENT_TYPE_COOL_BLUES. CustomGradient.GRADIENT_TYPE_MEGATRON. CustomGradient.GRADIENT_TYPE_MOONLIT_ASTEROID. CustomGradient.GRADIENT_TYPE_JSHINE. CustomGradient.GRADIENT_TYPE_EVENING_SUNSHINE. CustomGradient.GRADIENT_TYPE_DARK_OCEAN. CustomGradient.GRADIENT_TYPE_COOL_SKY. CustomGradient.GRADIENT_TYPE_YODA. CustomGradient.GRADIENT_TYPE_MEMARIANI.

0.1.5 #

  • Update function name.
  • Added License.
  • Update Library name.

0.1.4 #

  • Update README.

0.1.3 #

  • Some Gradient not working issue fixed

0.1.2 #

  • Change Method Name
  • Fix bug

0.1.1 #

  • Update README

0.1.0 #

  • Ready to use
  • Added 300+ Gradients

0.0.4 #

  • Finalize features.

0.0.3 #

  • Fix bugs.

0.0.2 #

  • Test build.

0.0.1 #

  • Initial build for library.

example/main.dart

import 'package:flutter/material.dart';
import 'package:gradient_box_decoration/src/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: CustomGradient.linearGradient(
                orientation: CustomGradient.ORIENTATION_HORIZONTAL,
                gradientType: CustomGradient.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_style: ^0.1.5

2. Install it

You can install packages from the command line:

with pub:


$ pub get

with Flutter:


$ flutter pub get

Alternatively, your editor might support pub get or 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_style/linear_gradient_style.dart';
  
Popularity:
Describes how popular the package is relative to other packages. [more]
0
Health:
Code health derived from static analysis. [more]
0
Maintenance:
Reflects how tidy and up-to-date the package is. [more]
53
Overall:
Weighted score of the above. [more]
11
Learn more about scoring.

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

  • Dart: 2.6.1
  • pana: 0.12.21
  • Flutter: 1.9.1+hotfix.6

Health issues and suggestions

Fix lib/src/color_combination.dart. (-100 points)

Analysis of lib/src/color_combination.dart failed with 669 errors, including:

line 2 col 8: Target of URI doesn't exist: 'package:gradient_box_decoration/src/linear_gradient.dart'.

line 11 col 12: Case expressions must be constant.

line 11 col 12: Undefined name 'CustomGradient'.

line 15 col 12: Case expressions must be constant.

line 15 col 12: Undefined name 'CustomGradient'.

Fix lib/src/linear_gradient.dart. (-95.78 points)

Analysis of lib/src/linear_gradient.dart failed with 11 errors, including:

line 2 col 8: Target of URI doesn't exist: 'package:gradient_box_decoration/src/color_combination.dart'.

line 3 col 8: Target of URI doesn't exist: 'package:gradient_box_decoration/src/orientation_type.dart'.

line 348 col 19: The method 'ColorCombination' isn't defined for the class 'CustomGradient'.

line 350 col 16: The method 'OrientationType' isn't defined for the class 'CustomGradient'.

line 351 col 18: The method 'ColorCombination' isn't defined for the class 'CustomGradient'.

Document public APIs. (-1 points)

340 out of 340 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.

Maintenance issues and suggestions

Fix platform conflicts. (-20 points)

Low code quality prevents platform classification.

Homepage URL doesn't exist. (-20 points)

At the time of the analysis the homepage field https://github.com/Prashant09mca/flutter_gradient_box_decoration was unreachable.

The package description is too short. (-7 points)

Add more detail to the description field of pubspec.yaml. Use 60 to 180 characters to describe the package, what it does, and its target use case.

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 1.1.8
sky_engine 0.0.99
typed_data 1.1.6
vector_math 2.0.8
Dev dependencies
flutter_test