MobilApp/lib/pages/home/presentation/widgets/big_button_widget.dart

44 lines
1.4 KiB
Dart
Raw Normal View History

2025-02-21 08:26:27 +01:00
import 'package:flutter/material.dart';
class BigButtonWidget extends StatelessWidget {
const BigButtonWidget(
{Key? key, required this.iconData, required this.label, this.onPressed})
: super(key: key);
final IconData iconData;
final String label;
final Function()? onPressed;
@override
Widget build(BuildContext context) {
return OutlinedButton(
onPressed: onPressed,
style: ButtonStyle(
minimumSize: MaterialStateProperty.all(const Size(130, 140)),
maximumSize: MaterialStateProperty.all(const Size(130, 140)),
shape: MaterialStateProperty.all<RoundedRectangleBorder>(
const RoundedRectangleBorder(borderRadius: BorderRadius.zero))),
child: Column(
mainAxisSize: MainAxisSize.min,
children: [
Padding(
padding: const EdgeInsets.fromLTRB(8.0, 10.0, 8.0, 4.0),
child: Icon(
iconData,
color: Colors.blueGrey,
size: 64,
),
),
Padding(
padding: const EdgeInsets.all(8.0),
child: Text(
label,
textAlign: TextAlign.center,
style: const TextStyle(
color: Colors.blueGrey, fontWeight: FontWeight.bold),
))
],
));
}
}