A curated collection of awesome gradients made in Dart for Flutter

Overview

Flutter Community: after_layout

Flutter Gradients

Header

A curated collection of awesome gradients made in Dart (port of https://webgradients.com for Flutter). Only linear gradients included for now.

Pub Build Status

Show some ❀️ and star the repo to support the project

GitHub stars GitHub forks GitHub watchers GitHub followers
Twitter Follow

Installation

Add the Package

dependencies:
  flutter_gradients: ^1.0.0+3

Usage

Import the package

import 'package:flutter_gradients/flutter_gradients.dart';

How To Use

For LinearGradient

By default FlutterGradient will generates the LinearGradient.

Exemple

   GradientType type: GradientType.linear;
    Container(
        width: 150,
        height: 150,
        decoration: BoxDecoration(
            shape: BoxShape.circle,
            gradient: FlutterGradient.warmFlame(),
        ),
    );

or

    Container(
        width: 150,
        height: 150,
        decoration: BoxDecoration(
            shape: BoxShape.circle,
            gradient: FlutterGradient.warmFlame(type: GradientType.linear),
        ),
    );

For RadialGradient

You can customize the follows values :

  • center : The center of the gradient, as an offset into the (-1.0, -1.0) x (1.0, 1.0) square describing the gradient which will be mapped onto the paint box.
  • radius : The radius of the gradient, as a fraction of the shortest side of the paint box.
  • tileMode : How this gradient should tile the plane beyond the outer ring at radius pixels from the center.

Exemple

   GradientType type: GradientType.radial;
    Container(
        width: 150,
        height: 150,
        decoration: BoxDecoration(
            shape: BoxShape.circle,
            gradient: FlutterGradient.warmFlame(
                type: GradientType.radial,
                center: Alignment.center,
                radius: 0.5,
                tileMode = TileMode.clamp,
           ),
        ),
    );

For SweepGradient

You can customize the follows values :

  • center : The center of the gradient, as an offset into the (-1.0, -1.0) x (1.0, 1.0) square describing the gradient which will be mapped onto the paint box.
  • startAngle : The angle in radians at which stop 0.0 of the gradient is placed.
  • endAngle : The angle in radians at which stop 1.0 of the gradient is placed.
  • tileMode : How this gradient should tile the plane beyond the outer ring at radius pixels from the center.

Exemple

   GradientType type: GradientType.sweep;
    Container(
        width: 150,
        height: 150,
        decoration: BoxDecoration(
            shape: BoxShape.circle,
            gradient: FlutterGradient.warmFlame(
                type: GradientType.sweep,
                center: Alignment.center,
                startAngle: 0.0,
                endAngle: math.pi * 2,
                tileMode = TileMode.clamp,
            ),
        ),
    );

Catalogue

1 2 3
Image 01 Image 02 Image 03
Image 04 Image 05 Image 06
Image 07 Image 08 Image 09
Image 10 Image 11 Image 12
Image 13 Image 14

Examples

Web and command-line examples can be found in the example folder.

Web Examples

In order to run the web examples, please follow these steps:

  1. Clone this repo and enter the directory
  2. Run pub get
  3. Run pub run build_runner serve example
  4. Navigate to http://localhost:8080/web/ in your browser

Command Line Examples

In order to run the command line example, please follow these steps:

  1. Clone this repo and enter the directory
  2. Run pub get
  3. Run dart example/lib/main.dart

Flutter Example

Install Flutter

In order to run the flutter example, you must have Flutter installed. For installation instructions, view the online documentation.

Run the app

  1. Open up an Android Emulator, the iOS Simulator, or connect an appropriate mobile device for debugging.
  2. Open up a terminal
  3. cd into the example/lib/ directory
  4. Run flutter doctor to ensure you have all Flutter dependencies working.
  5. Run flutter packages get
  6. Run flutter run

License

MIT License

Copyright (c) 2020 Jonathan Monga

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
You might also like...

A growing collection of cool, elegant, efficient and performance-optimized animation widgets.

im_animations About A growing collection of cool, elegant, efficient and performance-optimized animation widgets. Feedback For any feedback please fil

Nov 13, 2022

Beautiful TabBar Interaction with Sliding Inset FABs, made with Flutter Dart.

Beautiful TabBar Interaction with Sliding Inset FABs, made with Flutter Dart.

#Flutter Tab Bar Interaction Beautiful TabBar Interaction with Sliding Inset FABs, made with Flutter Dart. Pure Dart. No native dependencies. No linki

Nov 4, 2021

Dart package that converts number to words (English language)A Flutter/Dart package that converts number to words (English language)

flutter_number_to_words_english A Flutter/Dart package that converts number to words (English language) Flutter (Null Safety) Flutter (Channel stable,

Dec 9, 2022

A candy sorter game made with Flutter for the march flutter challenge.

A candy sorter game made with Flutter for the march flutter challenge.

A candy sorter game made with Flutter for the march flutter challenge.

Apr 9, 2022

Flutter Animation πŸ±β€πŸ‘€ Made with algeria By DZ-TM071

Flutter Animation πŸ±β€πŸ‘€ Made with algeria By DZ-TM071

Flutter Animation πŸ±β€πŸ‘€ Made with algeria By DZ-TM071

Oct 23, 2022

Flutter Animation πŸ±β€πŸ‘€ Made with algeria πŸ–€

Flutter Animation πŸ±β€πŸ‘€ Made with algeria πŸ–€

Flutter-awesome-login-page-animated-fastCode πŸ±β€πŸ‘€ Fast code and awesome design-ui for Login Page ! πŸ”₯ Getting Started # First you need to add simple_

Oct 24, 2022

Flutter Animation liquid πŸ±β€πŸ‘€ Made with algeria By DZ-TM071

Flutter Animation liquid πŸ±β€πŸ‘€ Made with algeria By DZ-TM071

Flutter Animated Loading liquid progress πŸš€ πŸ”₯ πŸ”₯ screen screen # Usage First you need to add liquid_progress_indicator 0.4.0 Or + in the dependency a

Jan 10, 2022

Flutter Animation Made with algeria By DZ-TM071 πŸš€__πŸ”₯

Flutter Animation Made with algeria By DZ-TM071 πŸš€__πŸ”₯

ByDzTm071 🐱 Fast code and awesome design-ui for Login Page Part 3 ! πŸ”₯ image gif image Getting Started # First you need to add simple_animations 4.0.

Oct 28, 2022

Inspired by Reflectly App Made in Flutter ❀️

Inspired by Reflectly App Made in Flutter ❀️

Inspired By Reflectly App πŸ“± Gif πŸ“± Screenshots Download the Following App for Preview πŸ–₯ Flutter Tutorial All Flutter Tutorials plus additional Code

Nov 16, 2022
Comments
  • Possibility to set tileMode

    Possibility to set tileMode

    It seems that all the gradients are created with TileMode.repeated. However, in many cases this is not ideal, and in general it should be configurable.

    See: https://api.flutter.dev/flutter/painting/LinearGradient/tileMode.html

    opened by abianche 2
Owner
Jonathan Monga
Android & Flutter developer | Speaker | Writer.
Jonathan Monga
A collection of awesome flutter loading animation

loading_indicator_view A collection of awesome flutter loading animation Demo Usage loading_indicator_view: ^1.1.0 Animation types Type Type Type Typ

Vans Z 84 Dec 6, 2022
A collection of awesome loading animations

NVActivityIndicatorView ⚠️ Check out LoaderUI (ready to use with Swift Package Mananger supported) for SwiftUI implementation of this. ?? Introduction

Vinh Nguyen 10.3k Jan 3, 2023
Flutter package for creating awesome animations.

?? Simple Animations Simple Animations is a powerful package to create beautiful custom animations in no time. ?? fully tested ?? well documented ?? e

Felix Blaschke 879 Dec 31, 2022
An awesome list that curates the best Flutter libraries, tools, tutorials, articles and more.

Flutter is Google’s UI toolkit for building beautiful, natively compiled applications for mobile, web, and desktop from a single codebase. If you appr

Robert Felker 44.6k Dec 30, 2022
πŸš…Flutter out-of-the-box collection animations written in pure dart.

LoadingIndicator A collection of out of the box loading animations written in pure dart, no extra dependency, inspired by loaders.css and NVActivityIn

Tino 170 Jan 1, 2023
✨ A collection of loading indicators animated with flutter. Heavily Inspired by http://tobiasahlin.com/spinkit.

✨ Flutter Spinkit A collection of loading indicators animated with flutter. Heavily inspired by @tobiasahlin's SpinKit. ?? Installing dependencies:

Jeremiah Ogbomo 2.7k Dec 30, 2022
A collection of Animations that aims to improve the user experience for your next flutter project.

A collection of Animations that aims to improve the user experience for your next flutter project.

Ezaldeen Sahb 134 Dec 24, 2022
A collection of Screens and attractive UIs built with Flutter ready to be used in your applications. No external libraries are used. Just download, add to your project and use.

Flutter Screens A collection of Login Screens, Buttons, Loaders and Widgets with attractive UIs, built with Flutter, ready to be used in your applicat

Samarth Agarwal 5k Dec 31, 2022
A flutter package which contains a collection of some cool and beautiful effects; support android and ios

flutter effects A flutter package which contains a collection of some cool and beautiful effects; support android and ios . Screenshot type support ch

倧桷豚 462 Jan 3, 2023
A collection of loading indicators animated with CSS

SpinKit Simple loading spinners animated with CSS. See demo. SpinKit only uses (transform and opacity) CSS animations to create smooth and easily cust

Tobias Ahlin 19k Dec 26, 2022