Files
finger_print_app/lib/widgets/onboarding_button.dart
2025-12-06 12:21:48 +03:00

55 lines
1.5 KiB
Dart

import 'package:flutter/material.dart';
class OnboardingButton extends StatelessWidget {
final String text;
final VoidCallback? onPressed;
final Color backgroundColor;
final Color textColor;
const OnboardingButton({
super.key,
required this.text,
this.onPressed,
this.backgroundColor = const Color(0xFF2D2D2D),
this.textColor = Colors.white,
});
@override
Widget build(BuildContext context) {
return Container(
decoration: BoxDecoration(
boxShadow: [
BoxShadow(
color: const Color.fromARGB(59, 59, 59, 59),
spreadRadius: 1,
blurRadius: 14,
offset: const Offset(0, 4),
),
],
),
child: ElevatedButton(
onPressed: onPressed,
style: ElevatedButton.styleFrom(
backgroundColor: backgroundColor,
foregroundColor: textColor,
disabledForegroundColor: textColor,
disabledBackgroundColor: backgroundColor,
padding: const EdgeInsets.symmetric(horizontal: 80, vertical: 10),
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(16),
),
elevation: 8,
shadowColor: const Color(0x47000000), // More defined shadow color
),
child: Text(
text,
style: TextStyle(
color: textColor, // Use the textColor parameter here
fontSize: 22,
fontWeight: FontWeight.w600,
),
),
),
);
}
}