Flutter 3.x & Dart 3 Ready Studio

Flutter Gradient Generator

Design beautiful gradients and generate ready-to-use Flutter code.

Step into our dedicated full-screen Studio to design Linear, Radial, and Sweep gradients with real-time preview, pinned viewport, and WCAG contrast analyzer.

Launch Gradient Playground
Interactive Studio PreviewCosmic Royal
LinearGradient
Edit in Playground
LinearGradient RadialGradient SweepGradient BoxDecoration Pinned Live Preview
Dedicated Studio Mode

Full-Screen Gradient Playground

Featuring an independently scrollable configuration panel, pinned live preview, smart WCAG color contrast analyzer, 36+ curated presets, and instant Flutter Dart code export.

Pinned Preview
Never scrolls away
WCAG Contrast
Smart 1-click nudge
Flutter 3 Code
Clean Dart export
Open Gradient Playground
Categorized Library

Curated Gradient Presets

Filter by aesthetic mood, Flutter UI role (AppBars, CTAs, Cards), or gradient geometry for fast app styling.

Displaying 60 categorized gradientsClick "Playground" to inspect & customize
linear
Popular

Deep Purple Glow

#6A11CB → #2575FC
linear
Popular

Hyper Sunset

#FF512F → #DD2476
linear
Popular

Emerald Water

#0BA360 → #3CBA92
radial
Popular

Cosmic Nebula

#FF007F → #7928CA → #111827
sweep
Popular

Aurora Sweep

#00F2FE → #4FACFE → #000046 → #00F2FE
linear
Sunset

Malibu Sunset

#FF7E5F → #FEB47B
linear
Sunset

Golden Hour

#F2994A → #F2C94C
linear
Sunset

Twilight Horizon

#2C3E50 → #FD746C
radial
Sunset

Dusk Ember

#FF4E50 → #F9D423 → #2B1055
linear
Ocean

Ocean Blue

#00C6FF → #0072FF
linear
Ocean

Deep Sea Trench

#1A2980 → #26D0CE
linear
Ocean

Pacific Mist

#34e89e → #0f3443
linear
Ocean

Coastal Lagoon

#48c6ef → #6f86d6
linear
Purple

Violet Mirage

#8E2DE2 → #4A00E0
linear
Purple

Mystic Plum

#654ea3 → #eaafc8
radial
Purple

Royal Lavender

#C33764 → #1D2671
linear
Blue

Flutter Blue

#02569B → #0175C2 → #13B9FD
linear
Blue

Cerulean Tide

#2193b0 → #6dd5ed
linear
Blue

Frost Azure

#0052D4 → #4364F7 → #6FB1FC
linear
Pink

Berry Smoothie

#EC008C → #FC6767
linear
Pink

Flamingo Rush

#ff9a9e → #fecfef
radial
Pink

Neon Rose

#f857a6 → #ff5858
linear
Green

Lush Bamboo

#56ab2f → #a8e063
linear
Green

Mint Condition

#00b09b → #96c93d
linear
Green

Deep Forest

#134E5E → #71B280
linear
Orange

Citrus Zest

#FDC830 → #F37335
radial
Orange

Solar Flare

#FFE000 → #799F0C
linear
Orange

Warm Flame

#ff9966 → #ff5e62
linear
Dark

Obsidian Night

#141E30 → #243B55
radial
Dark

Carbon Glow

#434343 → #000000
linear
Dark

Midnight Velvet

#0F2027 → #203A43 → #2C5364
linear
Pastel

Cotton Candy

#D4FC79 → #96E6A1
linear
Pastel

Peach Sorbet

#FEE140 → #FA709A
linear
Pastel

Soft Dream

#a1c4fd → #c2e9fb
linear
Neon

Cyberpunk Drive

#F72585 → #7209B7 → #3A0CA3 → #4361EE → #4CC9F0
sweep
Neon

Electric Volt

#00F5D4 → #7B2CBF → #F15BB5 → #00F5D4
linear
Neon

Laser Matrix

#0575E6 → #00F260
linear
Material

Material Indigo Teal

#3F51B5 → #009688
linear
Material

Material Flame

#F44336 → #FFC107
linear
Material

Material Cyan Sky

#00BCD4 → #2196F3
linearBackdrop
Aurora

Aurora Borealis

#00F260 → #0575E6
radialSpotlight
Aurora

Cosmic Orbit Glow

#7F00FF → #E100FF → #0D0B18
sweepConic
Aurora

Nebula Galaxy Sweep

#4A00E0 → #8E2DE2 → #F000FF → #4A00E0
linearCard
Earth

Matcha Botanical

#134E5E → #71B280
linearAppBar
Earth

Forest Canopy Header

#11998E → #38EF7D
linearCTA
Earth

Bamboo Dew CTA

#56AB2F → #A8E063
linearCard
Earth

Deep Sage Surface

#2E4A3F → #4F7762 → #94B49F
linearCTA
Fire

Solar Flare CTA

#FF4E50 → #F9D423
linearCTA
Fire

Phoenix Ember Action

#F12711 → #F5AF19
radialSpotlight
Fire

Magma Glow Spotlight

#FFE259 → #FFA751 → #FF5E62
linearAppBar
Metallic

Titanium Slate Nav

#2C3E50 → #3498DB
linearCard
Metallic

Liquid Silver Card

#8A9BA8 → #DCE5EB → #708291
linearBackdrop
Metallic

Obsidian Carbon OLED

#0F2027 → #203A43 → #2C5364
linearAppBar
Blue

Cupertino Indigo AppBar

#1A237E → #283593
linearAppBar
Green

Modern Teal AppBar

#004D40 → #00796B
linearCTA
Purple

Electric Violet Button

#7F00FF → #E100FF
linearCTA
Green

Emerald Success Pill

#00B09B → #96C93D
linearCard
Blue

Frost Glass Surface

#2C3E50 → #4CA1AF
radialSpotlight
Blue

Ambient Orb Spotlight

#4facfe → #00f2fe → #0b132b
sweepConic
Neon

Fitness Activity Conic

#FA709A → #FEE140 → #38F9D7 → #FA709A
Flutter Examples

Ready-to-Use Flutter UI Patterns

Real-world Flutter widgets utilizing Linear, Radial, and Sweep gradients with copy-pasteable Dart code.

Gradient Container

Gradient Container

Standard Flutter Container decorated with a smooth LinearGradient and rounded border radius.

Dart

Gradient Elevated Button

Modern pill button using Ink or Container inside ElevatedButton for ripple ink splashes.

Dart
Total Revenue
$24,580.00

Gradient Card

Rich card surface suitable for dashboard summaries, headers, and media items.

Dart
Flutter Magic

Gradient Text (ShaderMask)

Paints vibrant text in Flutter using ShaderMask and BlendMode.srcIn with createShader.

Dart
FL

Circular Gradient Avatar

Radial or Sweep gradient circular indicator for user profile pictures and badges.

Dart
Scaffold Body

Background Gradient Scaffold

Full-screen app background gradient applied cleanly to the Scaffold body.

Dart
Developer Guide

Flutter Gradients Documentation

A comprehensive reference for Flutter’s painting library: understanding LinearGradient, RadialGradient, and SweepGradient.

1What is a Flutter Gradient?

In Flutter, the abstract Gradient class is part of the dart:ui and flutter/painting.dart library. Gradients represent a 2D shader that smoothly transitions between two or more colors across a geometry.

Gradients are most frequently supplied to a BoxDecoration via the gradient parameter, which is then rendered by a Container, DecoratedBox, or converted into an Skia/Impeller shader via createShader(rect) for use with custom painters or ShaderMask.

2LinearGradient

A LinearGradient transitions colors smoothly along a straight vector defined from a begin alignment to an end alignment.

LinearGradient(
  begin: Alignment.topLeft,
  end: Alignment.bottomRight,
  colors: [
    Color(0xFF6A11CB),
    Color(0xFF2575FC),
  ],
  stops: [0.0, 1.0], // Optional: distribution of color stops
  tileMode: TileMode.clamp, // clamp, repeated, mirror, decal
  transform: GradientRotation(0.785), // Optional rotation
)
begin & end

Specifies start and termination points using Alignment(-1.0, -1.0) (top-left) to Alignment(1.0, 1.0) (bottom-right).

colors & stops

colors takes a list of at least 2 Color instances. stops specifies fractions from 0.0 to 1.0.

tileMode

Defines what happens when the gradient is tiled: TileMode.clamp, TileMode.repeated, TileMode.mirror, or TileMode.decal.

transform

Pass a GradientTransform like GradientRotation(radians) to rotate without adjusting begin/end points manually.

3RadialGradient

A RadialGradient paints color transitions emanating outwards in concentric circles from a center point up to a given radius.

RadialGradient(
  center: Alignment.center,
  radius: 0.8,
  focal: Alignment(-0.2, -0.2), // Optional focal light point
  focalRadius: 0.1,
  colors: [
    Color(0xFFFF007F),
    Color(0xFF7928CA),
  ],
  tileMode: TileMode.clamp,
)
radius

The radius of the gradient as a fraction of the shortest side of the painting bounding box.

focal & focalRadius

Allows offsetting the visual "bright spot" or light source inside the radial circle, simulating realistic spherical shading.

4SweepGradient

A SweepGradient (analogous to conic gradients in web design) sweeps color transitions clockwise in an angular arc around a center point.

import 'dart:math' as math;

SweepGradient(
  center: Alignment.center,
  startAngle: 0.0,
  endAngle: math.pi * 2,
  colors: [
    Color(0xFF00F5D4),
    Color(0xFF7B2CBF),
    Color(0xFFF15BB5),
    Color(0xFF00F5D4), // Wrap back to first color for seamless seam
  ],
)

Pro-Tip: To avoid a sharp, visible line where a SweepGradient completes its 360-degree circle (math.pi * 2), set the final color in your colors array to match the initial color stop.

Flutter Performance Best Practices

  • Use const LinearGradient(...) whenever colors and alignments are static to allow Flutter to avoid re-allocating memory during widget rebuilds.
  • When using ShaderMask for animated or scrolling lists, wrap it in a RepaintBoundary to prevent redundant GPU shader recompilations on every tick.
  • For complex gradient headers that never change, prefer caching into a static constant or rendering on a cached canvas layer.
Frequently Asked Questions

Common Questions About Flutter Gradients

Everything you need to know about implementing gradients in your Flutter apps.

A Flutter Gradient is a 2D shader that interpolates smoothly between two or more colors. Flutter provides three concrete gradient classes: LinearGradient (directional lines), RadialGradient (concentric circles), and SweepGradient (circular sweeps). They are most commonly applied via BoxDecoration inside Container widgets.