notes/lib/widgets/icon_text_button.dart

34 lines
749 B
Dart
Raw Normal View History

2022-11-17 10:39:06 +00:00
import 'package:flutter/material.dart';
import 'icon_material_button.dart';
class IconTextButton extends StatelessWidget {
const IconTextButton(
{Key? key,
required this.icon,
required this.color,
required this.onPressed,
required this.text,
this.iconSize})
: super(key: key);
final Widget icon;
final Color color;
final void Function() onPressed;
final String text;
final double? iconSize;
@override
Widget build(BuildContext context) {
return Column(
children: [
IconMaterialButton(
icon: icon, color: color, onPressed: onPressed, iconSize: iconSize),
Text(
text,
style: TextStyle(color: color),
)
],
);
}
}