advanced_button 1.0.1
advanced_button: ^1.0.1 copied to clipboard
A highly customizable Flutter button widget with advanced features like gradient backgrounds, blink animations, and full styling control.
Advanced Button #
AdvancedButton is a highly customizable Flutter widget that simplifies button creation while offering advanced features like gradient backgrounds, blink animations, and complete control over styling. This package helps developers quickly implement buttons with a polished, professional appearance.
Features #
- Customizable Dimensions: Set button height and width easily.
- Styling Options: Adjust button color, text color, font size, font weight, and text alignment.
- Icon Support: Add prefix and suffix icons with configurable padding.
- Button States: Handle enabled and disabled states with separate colors.
- Blink Animation: Interactive blink effect when the button is enabled.
- Gradient Background: Optional gradient color support for aesthetic customization.
Getting started #
Add the package to your pubspec.yaml file:
dependencies:
advanced_button: ^1.0.1
Run the following command to fetch the package:
flutter pub get
Usage #
Add longer examples to /example
folder.
Below is an example of how to use the AdvancedButton widget:
import 'package:flutter/material.dart';
import 'package:advanced_button/advanced_button.dart';
void main() {
runApp(const MyApp());
}
class MyApp extends StatelessWidget {
const MyApp({Key? key}) : super(key: key);
@override
Widget build(BuildContext context) {
return MaterialApp(
home: Scaffold(
appBar: AppBar(title: const Text("Advanced Button Example")),
body: Center(
child: AdvancedButton(
height: 50,
width: 250,
buttonColor: Colors.blue,
textColor: Colors.white,
fontSize: 18,
fontWeight: FontWeight.bold,
textAlignment: Alignment.center,
splashColor: Colors.white,
splashRadius: 40.0,
buttonPadding: const EdgeInsets.symmetric(horizontal: 10.0),
prefixIcon: const Icon(Icons.thumb_up, color: Colors.white),
prefixIconPadding: const EdgeInsets.only(right: 10),
suffixIcon: const Icon(Icons.arrow_forward, color: Colors.white),
suffixIconPadding: const EdgeInsets.only(left: 10),
onPressed: () {
debugPrint("Button Pressed!");
},
isEnabled: true,
enabledColor: Colors.blue,
disabledColor: Colors.grey,
gradient: const LinearGradient(
colors: [Colors.blue, Colors.lightBlueAccent],
begin: Alignment.topLeft,
end: Alignment.bottomRight,
),
),
),
),
);
}
}
Additional information #
Contribution Contributions are welcome! If you encounter any issues, please feel free to submit them via GitHub Issues. You can also contribute by submitting pull requests to enhance the package.
Feedback For suggestions, feedback, or feature requests, feel free to contact us at [iamanand.me@gmail.com].
License This package is available under the MIT License. See the LICENSE file for more details.