Search packages, repositories and app categories

gradient_coloured_buttons cover
Package detailsv0.1.0

gradient_coloured_buttons

Create visually appealing buttons with customizable gradient colors, dimensions, and border radius to enhance your Flutter UI.

AndroidiOSWebmacOSWindowsLinux
30-day downloads
29
Likes
87
Pub points
130

Install package

flutter pub add gradient_coloured_buttons

Package Overview

Package selection guidance compiled from public package information, community data, and project usage.

A Flutter package that enables developers to create attractive buttons with fully customizable gradient colors, dimensions, and border radius. It enhances user interfaces by offering smooth color transitions and modern visual appeal across multiple platforms. The package is easy to integrate and ideal for apps aiming to stand out with dynamic button designs. It supports all major Flutter platforms including Android, iOS, Web, macOS, Windows, and Linux.

Use cases

  • Enhancing app UI with vibrant buttons
  • Creating interactive call-to-action elements
  • Designing modern login or signup screens
  • Improving visual feedback in forms
  • Adding aesthetic flair to dashboards
  • Customizing button styles without extra code

Key features

  • Fully customizable gradient colors
  • Adjustable button dimensions
  • Configurable border radius
  • Cross-platform compatibility
  • Simple integration via pub.dev
  • Supports both linear and radial gradients

Suitable for

  • UI designers seeking visual polish
  • Developers building modern Flutter apps
  • Apps requiring engaging interactive elements
  • Projects focused on aesthetics and branding
  • Teams wanting quick button customization

Considerations

  • May require additional styling for accessibility
  • Gradient performance impact on complex layouts
  • Limited built-in animation options
  • Best used with contrasting text for readability
  • Not ideal for minimalistic design approaches

Original README

Original README snapshot from the linked source repository. Visit the repository for the latest content.

Gradient Button

A Flutter package that provides customizable buttons with gradient colors. Enhance your Flutter UI by easily creating buttons with smooth gradient backgrounds.

Features

  • Create buttons with gradient backgrounds using the GradientButton widget.
  • Customize button dimensions, border radius, and more.
  • Easy integration and usage within your Flutter projects.

Getting started

To use this package, add gradient_coloured_buttons as a dependency in your pubspec.yaml file:

dependencies:

gradient_coloured_buttons: ^0.0.7

Example

These are the properties that you can modify:

  • text

  • onPressed

  • gradientColors

  • width

  • height

  • borderRadius

  • textStyle

Usage

//HERE IS THE COMPLETE CODE ...

import 'package:flutter/material.dart';

//Import the package in your Dart file:

import 'package:gradient_coloured_buttons/gradient_coloured_buttons.dart';

void main() {
runApp(GradientButtons());
}

class GradientButtons extends StatelessWidget {
@override
Widget build(BuildContext context) {
  return MaterialApp(
    title: 'Gradient Coloured button',
    theme: ThemeData(
      primarySwatch: Colors.blue,
    ),
    home: GradientColouredButton(),
  );
}
}
class GradientColouredButton extends StatefulWidget {
const GradientColouredButton({Key? key}) : super(key: key);

@override
State<GradientColouredButton> createState() => _GradientColouredButtonState();
}

class _GradientColouredButtonState extends State<GradientColouredButton> {
@override
Widget build(BuildContext context) {
  return Scaffold(
    body:
    //      <---content STARTS here--->
    GradientButton(
            text: "Johnson Redonyx Silva",
            textStyle: const TextStyle(fontWeight: FontWeight.bold,fontSize: 15),
            gradientColors: const [Colors.red,Colors.black,Colors.brown],
            width: 200,
            height: 50,
            borderRadius: 30.0,
            onPressed: ()
            {
              print("GradientButton is Pressed");
            }
        ),
    //      <---content ENDS here--->
  );
}
}

Example Image

Example Image

Additional information

This package offers a straightforward solution to apply gradient colors to buttons, enabling you to enhance their visual appeal effortlessly and efficiently.

Categories

Source repository

Projects using this package

No data available yet.