DiscoverModule/lib/contacts_module/custom_widget/icontext_widget.dart

38 lines
845 B
Dart

import 'package:flutter/material.dart';
class IconTextRow extends StatelessWidget {
final IconData? icon;
final String? text;
final double iconSize;
final Color iconColor;
final double fontSize;
const IconTextRow({
Key? key,
this.icon,
required this.text,
this.iconSize = 20.0,
this.iconColor = Colors
.blue, // Default color, replace with your Constants.k2color if needed
this.fontSize = 16.0,
}) : super(key: key);
@override
Widget build(BuildContext context) {
return Row(
children: [
// Icon(
// icon,
// size: iconSize,
// color: iconColor,
// ),
SizedBox(width: 8.0),
Text(
text ?? '', // Show empty string if text is null
style: TextStyle(fontSize: fontSize),
),
],
);
}
}