44 lines
1.4 KiB
Dart
44 lines
1.4 KiB
Dart
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),
|
|
))
|
|
],
|
|
));
|
|
}
|
|
}
|