项目作者: bluemix

项目描述 :
Flutter widgets wrapped with gradients
高级语言: Dart
项目地址: git://github.com/bluemix/Gradient-Widgets.git
创建时间: 2018-10-25T13:09:17Z
项目社区:https://github.com/bluemix/Gradient-Widgets

开源协议:Apache License 2.0

下载


Pub

Gradient Widgets

Gradient Widgets

As of ^0.5.0, shadowColor is available for gradient buttons and cards

A minimal set of Flutter widgets encased with beautiful gradients.

You can use them when your UI needs user attention/focus,
, e.g., login or send actions, or important shopping item title (see Gradient Screens to get the idea 😉)

☑️ GradientText

☑️ GradientCard

☑️ GradientButton

☑️ CircularGradientButton + Shadow Color

☑️ GradientProgressIndicator

☑️ CircularGradientProgressIndicator

◻️ GradientAppBar

Installation

In your pubspec.yaml root add:

  1. dependencies:
  2. gradient_widgets: ^0.6.0

then,

  1. import 'package:gradient_widgets/gradient_widgets.dart';

Usage

Card + Gradient

  1. GradientCard(
  2. gradient: Gradients.tameer,
  3. shadowColor: Gradients.tameer.colors.last.withOpacity(0.25),
  4. elevation: 8,
  5. );

most parameters are the same as the Card.

Progress Indicator + Gradient

Gradient Widgets

must be gradient.colors.length = 2

indeterminate

  1. GradientProgressIndicator(gradient: Gradients.rainbowBlue,);

determinate

  1. GradientProgressIndicator(
  2. gradient: Gradients.rainbowBlue,
  3. value: 0.65,
  4. );

Circular Progress Indicator + Gradient

Circular Gradient Progress Widgets

must be gradient.colors.length = 2

indeterminate

  1. GradientCircularProgressIndicator(
  2. gradient: Gradients.aliHussien,
  3. );

determinate

  1. GradientCircularProgressIndicator(
  2. gradient: Gradients.aliHussien,
  3. radius: 100,
  4. );

Normal Button + Gradient

  1. GradientButton(
  2. child: Text('Gradient'),
  3. callback: () {},
  4. gradient: Gradients.backToFuture,
  5. shadowColor: Gradients.backToFuture.colors.last.withOpacity(0.25),
  6. ),

most parameters are the same as any *Button.

Circular Button + Gradient

  1. CircularGradientButton(
  2. child: Icon(Icons.gradient),
  3. callback: (){},
  4. gradient: Gradients.rainbowBlue,
  5. shadowColor: Gradients.rainbowBlue.colors.last.withOpacity(0.5),
  6. ),

most parameters are the same as FloatingActionButton.

Text + Gradient

  1. GradientText(
  2. 'Hello',
  3. shaderRect: Rect.fromLTWH(0.0, 0.0, 50.0, 50.0),
  4. gradient: Gradients.hotLinear,
  5. style: TextStyle(fontSize: 40.0,),
  6. ),

all parameters are the same as the Text.


Getting Started

For help getting started with Flutter, view our online documentation.

For help on editing package code, view the documentation.