프로젝트 최초 커밋
This commit is contained in:
46
lib/screens/common/metronic_card.dart
Normal file
46
lib/screens/common/metronic_card.dart
Normal file
@@ -0,0 +1,46 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:superport/screens/common/theme_tailwind.dart';
|
||||
|
||||
/// 메트로닉 스타일 카드 위젯 (SRP 분리)
|
||||
class MetronicCard extends StatelessWidget {
|
||||
final String? title;
|
||||
final Widget child;
|
||||
final List<Widget>? actions;
|
||||
final EdgeInsetsGeometry? padding;
|
||||
final EdgeInsetsGeometry? margin;
|
||||
|
||||
const MetronicCard({
|
||||
Key? key,
|
||||
this.title,
|
||||
required this.child,
|
||||
this.actions,
|
||||
this.padding,
|
||||
this.margin,
|
||||
}) : super(key: key);
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Container(
|
||||
decoration: AppThemeTailwind.cardDecoration,
|
||||
margin: margin,
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
if (title != null || actions != null)
|
||||
Padding(
|
||||
padding: const EdgeInsets.all(16),
|
||||
child: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
if (title != null)
|
||||
Text(title!, style: AppThemeTailwind.subheadingStyle),
|
||||
if (actions != null) Row(children: actions!),
|
||||
],
|
||||
),
|
||||
),
|
||||
Padding(padding: padding ?? const EdgeInsets.all(16), child: child),
|
||||
],
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user