π Gradient UI Plus
Gradient_ui_plus is a Flutter package that helps you easily add beautifully styled gradient-based UI widgets such as buttons, progress indicators, icon buttons, cards, and more β with minimal effort.
π· Screenshots
β¨ Features
- gradient_ui_plus is a Flutter package that helps you easily add beautifully styled gradient-based UI widgets such as buttons, progress indicators, icon buttons, cards, and more β with minimal effort.
π Gradient versions of:
- ElevatedButton, TextButton, FloatingActionButton
- LinearProgressIndicator, CircularProgressIndicator
- SelectableText, Icon, IconButton, Card
- π‘ Pre-styled for plug & play.
- π― Supports both determinate and indeterminate progress indicators.
- π¨ Easily customizable gradients using Flutter's built-in Gradient class.
π¦ Installation
Add the package to your pubspec.yaml
:
dependencies:
gradient_ui_plus: ^latest_version
dependencies:
flutter pub get
π Usage
Import the package:
import 'package:gradient_ui_plus/gradient_ui_widgets.dart';
π Gradient Buttons
GradientElevatedButton(
onPressed: () {},
gradient: LinearGradient(colors: [Colors.purple, Colors.pink]),
child: Text("Click Me"),
);
With icon:
GradientElevatedButton.icon(
onPressed: () {},
gradient: LinearGradient(colors: [Colors.orange, Colors.yellow]),
icon: Icon(Icons.star),
label: Text("Starred"),
);
πΉοΈ Gradient FAB
GradientFloatingActionButton(
onPressed: () {},
gradient: LinearGradient(colors: [Colors.cyan, Colors.blue]),
child: Icon(Icons.add),
);
extended:
GradientFloatingActionButton.extended(
onPressed: () {},
gradient: LinearGradient(colors: [Colors.teal, Colors.green]),
icon: Icon(Icons.add),
label: Text("Add Item"),
);
π Gradient Progress Indicators
Linear:
GradientLinearProgressIndicator(
value: 0.6,
valueGradient: LinearGradient(colors: [Colors.red, Colors.orange]),
);
Circular:
GradientCircularProgressIndicator(
value: 0.8,
valueGradient: LinearGradient(colors: [Colors.blue, Colors.green]),
);
π Gradient Selectable Text
GradientSelectableText(
"Gradient Text",
gradient: LinearGradient(colors: [Colors.purple, Colors.indigo]),
style: TextStyle(fontSize: 24, fontWeight: FontWeight.bold),
);
π Gradient Card
GradientCard(
gradient: LinearGradient(colors: [Colors.deepPurple, Colors.indigo]),
padding: EdgeInsets.all(12),
child: Column(
children: [
Text("This is a gradient card", style: TextStyle(color: Colors.white)),
Text("Stylish and clean", style: TextStyle(color: Colors.white)),
],
),
);
π Gradient Icons
GradientIcon(
Icons.favorite,
gradient: LinearGradient(colors: [Colors.red, Colors.pink]),
size: 50,
);
π§² Gradient IconButton
GradientIconButton(
icon: Icon(Icons.wifi),
gradient: LinearGradient(colors: [Colors.blueGrey, Colors.cyan]),
iconSize: 60,
onPressed: () {},
);
Box borders:
Change your container borders to use fancy gradients:
Container(
width: 100,
height: 100,
decoration: BoxDecoration(
border: const GradientBoxBorder(
gradient: LinearGradient(colors: [Colors.blue, Colors.red]),
width: 4,
),
borderRadius: BorderRadius.circular(16)
),
),
Input borders
You can use GradientOutlineInputBorder
as a part of your input decoration:
TextField(
decoration: InputDecoration(
border: GradientOutlineInputBorder(
gradient: LinearGradient(colors: [Colors.red, Colors.blue]),
width: 2,
),
focusedBorder: GradientOutlineInputBorder(
gradient: LinearGradient(colors: [Colors.yellow, Colors.green]),
width: 2
),
label: Text("Example"),
),
),
Input Underline borders
TextField(
decoration: InputDecoration(
border: GradientOutlineInputBorder(
gradient: LinearGradient(colors: [Colors.red, Colors.blue]),
width: 2,
),
focusedBorder: GradientUnderlineInputBorder(
gradient: LinearGradient(colors: [Colors.yellow, Colors.green]),
width: 2
),
label: Text("Example"),
),
),
π οΈ Customization
All gradient widgets accept standard Gradient objects, such as LinearGradient, RadialGradient, etc. You can use your own colors, stops, angles, and more.
π License
This project is licensed under the MIT License. See the LICENSE file for details.
π¬ Contributing
Feel free to submit issues or pull requests. Contributions are welcome!
π Author
Made with β€οΈ by Deepak.
Libraries
- borders/box_borders/gradient_box_border
- borders/gradient_borders
- borders/input_borders/gradient_outline_input_border
- borders/input_borders/gradient_underline_input_border
- gradient_ui_widgets
- icon/gradient_icon
- other/gradient_card
- progress_indicator/gradient_progress_indicator
- text/gradient_selectable_text
- text/gradient_text