39 lines
767 B
Dart
39 lines
767 B
Dart
import 'package:flutter/material.dart';
|
|
|
|
class IconText extends StatelessWidget {
|
|
final IconData icon;
|
|
final String text;
|
|
final Color? iconColor;
|
|
final TextStyle? textStyle;
|
|
final double spacing;
|
|
|
|
const IconText({
|
|
Key? key,
|
|
required this.icon,
|
|
required this.text,
|
|
this.iconColor,
|
|
this.textStyle,
|
|
this.spacing = 8.0,
|
|
}) : super(key: key);
|
|
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
return Row(
|
|
mainAxisSize: MainAxisSize.min,
|
|
crossAxisAlignment: CrossAxisAlignment.center,
|
|
children: [
|
|
Icon(
|
|
icon,
|
|
size: 16,
|
|
color: iconColor,
|
|
),
|
|
SizedBox(width: spacing),
|
|
Text(
|
|
text,
|
|
style: textStyle,
|
|
),
|
|
],
|
|
);
|
|
}
|
|
}
|