apptomate_custom_button 0.0.2
apptomate_custom_button: ^0.0.2 copied to clipboard
A fully-featured, highly customizable button component for Flutter applications with support for multiple states, loading indicators, and flexible styling options.
example/lib/main.dart
import 'package:apptomate_custom_button/custom_button.dart';
import 'package:flutter/material.dart';
void main() {
runApp(MyApp());
}
class MyApp extends StatelessWidget {
const MyApp({super.key});
@override
Widget build(BuildContext context) {
return MaterialApp(
debugShowCheckedModeBanner: false,
home: Scaffold(
body: SafeArea(
child: Center(
child: Column(
children: [
CustomButton(
buttonColor: Colors.grey,
primaryColor: Colors.grey,
surfaceColor: Colors.grey,
buttonName: "Disabled",
isEnabled: false,
onPressed: () => print("Won't trigger"), buttonTextStyle: null,
),
CustomButton(
primaryColor: Colors.red,
suffixIcon: Icon(Icons.add),
surfaceColor: Colors.yellow,
buttonTextStyle: TextStyle(color: Colors.black),
buttonName: "Sample Button With Gradient Colors",
buttonMargin:
const EdgeInsets.only(top: 24, bottom: 12, left: 24, right: 24),
buttonPadding: EdgeInsets.zero,
buttonHeight: 56,
buttonWidth: double.infinity,
buttonCornerRadius: 16,
buttonBorderColor: Colors.transparent,
elevation: 4,
shadowColor: Colors.blueAccent,
shadowBlurRadius: 6,
shadowOffset: const Offset(2, 8),
onPressed: () async {
}, buttonColor: Colors.yellow,
),
],
),
),
),
),
);
}
}