refactor: 코드베이스 정리 및 에러 처리 개선
- API 클라이언트 및 인증 인터셉터 에러 처리 강화 - 의존성 주입 실패 시에도 앱 실행 가능하도록 개선 - 사용하지 않는 레거시 UI 컴포넌트 및 화면 제거 - pubspec.yaml 의존성 업데이트 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -1,56 +0,0 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:superport/screens/common/theme_tailwind.dart';
|
||||
|
||||
// 최근 활동 리스트 위젯 (SRP, 재사용성)
|
||||
class RecentActivitiesList extends StatelessWidget {
|
||||
final List<Map<String, dynamic>> recentActivities;
|
||||
const RecentActivitiesList({super.key, required this.recentActivities});
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Column(
|
||||
children:
|
||||
recentActivities.map((activity) {
|
||||
return Column(
|
||||
children: [
|
||||
ListTile(
|
||||
leading: Container(
|
||||
padding: const EdgeInsets.all(8),
|
||||
decoration: BoxDecoration(
|
||||
color: activity['color'] as Color,
|
||||
shape: BoxShape.circle,
|
||||
),
|
||||
child: Icon(
|
||||
activity['icon'] as IconData,
|
||||
color: Colors.white,
|
||||
size: 20,
|
||||
),
|
||||
),
|
||||
title: Text(
|
||||
activity['title'] as String,
|
||||
style: AppThemeTailwind.subheadingStyle,
|
||||
),
|
||||
subtitle: Text(
|
||||
'${activity['type']} • ${activity['user']}',
|
||||
style: AppThemeTailwind.smallText,
|
||||
),
|
||||
trailing: Text(
|
||||
activity['time'] as String,
|
||||
style: AppThemeTailwind.smallText.copyWith(
|
||||
color: AppThemeTailwind.muted,
|
||||
),
|
||||
),
|
||||
),
|
||||
if (activity != recentActivities.last)
|
||||
const Divider(
|
||||
height: 1,
|
||||
indent: 68,
|
||||
endIndent: 16,
|
||||
color: (Color(0xFFEEEEF2)),
|
||||
),
|
||||
],
|
||||
);
|
||||
}).toList(),
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -1,83 +0,0 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:superport/screens/common/theme_tailwind.dart';
|
||||
import 'package:superport/screens/common/layout_components.dart';
|
||||
|
||||
// 대시보드 통계 카드 그리드 위젯 (SRP, 재사용성)
|
||||
class StatsGrid extends StatelessWidget {
|
||||
final int totalCompanies;
|
||||
final int totalUsers;
|
||||
final int totalLicenses;
|
||||
final int totalEquipmentIn;
|
||||
final int totalEquipmentOut;
|
||||
|
||||
const StatsGrid({
|
||||
super.key,
|
||||
required this.totalCompanies,
|
||||
required this.totalUsers,
|
||||
required this.totalLicenses,
|
||||
required this.totalEquipmentIn,
|
||||
required this.totalEquipmentOut,
|
||||
});
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return GridView.count(
|
||||
crossAxisCount: 3,
|
||||
crossAxisSpacing: 16,
|
||||
mainAxisSpacing: 16,
|
||||
shrinkWrap: true,
|
||||
childAspectRatio: 2.5,
|
||||
physics: const NeverScrollableScrollPhysics(),
|
||||
children: [
|
||||
MetronicStatsCard(
|
||||
title: '등록된 회사',
|
||||
value: '$totalCompanies',
|
||||
icon: Icons.business,
|
||||
iconBackgroundColor: AppThemeTailwind.info,
|
||||
showTrend: true,
|
||||
trendPercentage: 2.5,
|
||||
isPositiveTrend: true,
|
||||
),
|
||||
MetronicStatsCard(
|
||||
title: '등록된 사용자',
|
||||
value: '$totalUsers',
|
||||
icon: Icons.person,
|
||||
iconBackgroundColor: AppThemeTailwind.primary,
|
||||
showTrend: true,
|
||||
trendPercentage: 3.7,
|
||||
isPositiveTrend: true,
|
||||
),
|
||||
MetronicStatsCard(
|
||||
title: '유효 라이센스',
|
||||
value: '$totalLicenses',
|
||||
icon: Icons.vpn_key,
|
||||
iconBackgroundColor: AppThemeTailwind.secondary,
|
||||
),
|
||||
MetronicStatsCard(
|
||||
title: '총 장비 입고',
|
||||
value: '$totalEquipmentIn',
|
||||
icon: Icons.input,
|
||||
iconBackgroundColor: AppThemeTailwind.success,
|
||||
showTrend: true,
|
||||
trendPercentage: 1.8,
|
||||
isPositiveTrend: true,
|
||||
),
|
||||
MetronicStatsCard(
|
||||
title: '총 장비 출고',
|
||||
value: '$totalEquipmentOut',
|
||||
icon: Icons.output,
|
||||
iconBackgroundColor: AppThemeTailwind.warning,
|
||||
),
|
||||
MetronicStatsCard(
|
||||
title: '현재 재고',
|
||||
value: '${totalEquipmentIn - totalEquipmentOut}',
|
||||
icon: Icons.inventory_2,
|
||||
iconBackgroundColor: AppThemeTailwind.danger,
|
||||
showTrend: true,
|
||||
trendPercentage: 0.7,
|
||||
isPositiveTrend: false,
|
||||
),
|
||||
],
|
||||
);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user