81 lines
2.1 KiB
Dart
81 lines
2.1 KiB
Dart
import 'package:flutter/material.dart';
|
|
|
|
class BuildcardInfo extends StatelessWidget {
|
|
final IconData icon;
|
|
final String text;
|
|
final double? width; // = 120,
|
|
final IconData? extraIcon; //,
|
|
final String? extraText; //,
|
|
const BuildcardInfo({
|
|
super.key,
|
|
required this.icon,
|
|
required this.text,
|
|
required this.width,
|
|
this.extraIcon,
|
|
this.extraText,
|
|
});
|
|
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
return Container(
|
|
height: 36,
|
|
width: width ?? 120,
|
|
padding: EdgeInsets.symmetric(horizontal: 8, vertical: 5),
|
|
decoration: BoxDecoration(
|
|
color: Color.fromARGB(200, 255, 255, 255),
|
|
borderRadius: BorderRadius.circular(10),
|
|
boxShadow: [
|
|
BoxShadow(
|
|
// color: Color.fromARGB(255, 214, 213, 121),
|
|
blurRadius: 0,
|
|
spreadRadius: 0,
|
|
),
|
|
],
|
|
),
|
|
child: Row(
|
|
mainAxisAlignment: MainAxisAlignment.center,
|
|
children: [
|
|
IconTheme(
|
|
data: IconThemeData(
|
|
size: 20,
|
|
color: Color.fromARGB(255, 244, 189, 72),
|
|
),
|
|
child: Icon(icon),
|
|
),
|
|
SizedBox(width: 4),
|
|
Expanded(
|
|
child: Text(
|
|
text,
|
|
style: TextStyle(
|
|
fontSize: 12,
|
|
fontWeight: FontWeight.bold,
|
|
color: const Color.fromARGB(255, 0, 0, 0),
|
|
),
|
|
overflow: TextOverflow.ellipsis,
|
|
),
|
|
),
|
|
if (extraIcon != null && extraText != null) ...[
|
|
SizedBox(width: 6),
|
|
IconTheme(
|
|
data: IconThemeData(
|
|
size: 18,
|
|
color: Color.fromARGB(255, 244, 189, 72),
|
|
),
|
|
child: Icon(extraIcon),
|
|
),
|
|
SizedBox(width: 4),
|
|
Text(
|
|
extraText ?? '',
|
|
style: TextStyle(
|
|
fontSize: 12,
|
|
fontWeight: FontWeight.bold,
|
|
color: Color.fromARGB(255, 0, 0, 0),
|
|
),
|
|
),
|
|
],
|
|
],
|
|
),
|
|
);
|
|
}
|
|
}
|