프로젝트 최초 커밋
This commit is contained in:
48
lib/screens/equipment/widgets/equipment_out_info.dart
Normal file
48
lib/screens/equipment/widgets/equipment_out_info.dart
Normal file
@@ -0,0 +1,48 @@
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
// 출고 정보(회사, 담당자, 라이센스 등)를 아이콘과 함께 표시하는 위젯
|
||||
class EquipmentOutInfoIcon extends StatelessWidget {
|
||||
final String infoType; // company, manager, license 등
|
||||
final String text;
|
||||
|
||||
const EquipmentOutInfoIcon({
|
||||
super.key,
|
||||
required this.infoType,
|
||||
required this.text,
|
||||
});
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
// infoType에 따라 아이콘 결정
|
||||
IconData iconData;
|
||||
switch (infoType) {
|
||||
case 'company':
|
||||
iconData = Icons.business;
|
||||
break;
|
||||
case 'manager':
|
||||
iconData = Icons.person;
|
||||
break;
|
||||
case 'license':
|
||||
iconData = Icons.book;
|
||||
break;
|
||||
default:
|
||||
iconData = Icons.info;
|
||||
}
|
||||
|
||||
// 아이콘과 텍스트를 Row로 표시
|
||||
return Row(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
children: [
|
||||
Icon(iconData, size: 14, color: Colors.grey[700]),
|
||||
const SizedBox(width: 4),
|
||||
Flexible(
|
||||
child: Text(
|
||||
text,
|
||||
style: TextStyle(fontSize: 13, color: Colors.grey[800]),
|
||||
overflow: TextOverflow.ellipsis,
|
||||
),
|
||||
),
|
||||
],
|
||||
);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user