feat: API 통합 2차 작업 완료
- 자동 로그인 구현: 앱 시작 시 토큰 확인 후 적절한 화면으로 라우팅 - AuthInterceptor 개선: AuthService와 통합하여 토큰 관리 일원화 - 로그아웃 기능 개선: AuthService를 사용한 API 로그아웃 처리 - 대시보드 API 연동: MockDataService에서 실제 API로 완전 전환 - Dashboard DTO 모델 생성 (OverviewStats, RecentActivity 등) - DashboardRemoteDataSource 및 DashboardService 구현 - OverviewController를 ChangeNotifier 패턴으로 개선 - OverviewScreenRedesign에 Provider 패턴 적용 - API 통합 진행 상황 문서 업데이트
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:get_it/get_it.dart';
|
||||
import 'package:superport/screens/common/theme_shadcn.dart';
|
||||
import 'package:superport/screens/common/components/shadcn_components.dart';
|
||||
import 'package:superport/screens/overview/overview_screen_redesign.dart';
|
||||
@@ -7,6 +8,7 @@ import 'package:superport/screens/company/company_list_redesign.dart';
|
||||
import 'package:superport/screens/user/user_list_redesign.dart';
|
||||
import 'package:superport/screens/license/license_list_redesign.dart';
|
||||
import 'package:superport/screens/warehouse_location/warehouse_location_list_redesign.dart';
|
||||
import 'package:superport/services/auth_service.dart';
|
||||
import 'package:superport/utils/constants.dart';
|
||||
|
||||
/// Microsoft Dynamics 365 스타일의 메인 레이아웃
|
||||
@@ -430,9 +432,43 @@ class _AppLayoutRedesignState extends State<AppLayoutRedesign>
|
||||
// 로그아웃 버튼
|
||||
ShadcnButton(
|
||||
text: '로그아웃',
|
||||
onPressed: () {
|
||||
Navigator.of(context).pop();
|
||||
Navigator.of(context).pushReplacementNamed('/login');
|
||||
onPressed: () async {
|
||||
// 로딩 다이얼로그 표시
|
||||
showDialog(
|
||||
context: context,
|
||||
barrierDismissible: false,
|
||||
builder: (context) => Center(
|
||||
child: CircularProgressIndicator(),
|
||||
),
|
||||
);
|
||||
|
||||
try {
|
||||
// AuthService를 사용하여 로그아웃
|
||||
final authService = GetIt.instance<AuthService>();
|
||||
await authService.logout();
|
||||
|
||||
// 로딩 다이얼로그와 현재 모달 닫기
|
||||
if (context.mounted) {
|
||||
Navigator.of(context).pop(); // 로딩 다이얼로그
|
||||
Navigator.of(context).pop(); // 프로필 메뉴
|
||||
// 로그인 화면으로 이동
|
||||
Navigator.of(context).pushNamedAndRemoveUntil(
|
||||
'/login',
|
||||
(route) => false,
|
||||
);
|
||||
}
|
||||
} catch (e) {
|
||||
// 에러 처리
|
||||
if (context.mounted) {
|
||||
Navigator.of(context).pop(); // 로딩 다이얼로그 닫기
|
||||
ScaffoldMessenger.of(context).showSnackBar(
|
||||
SnackBar(
|
||||
content: Text('로그아웃 중 오류가 발생했습니다.'),
|
||||
backgroundColor: Colors.red,
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
},
|
||||
variant: ShadcnButtonVariant.destructive,
|
||||
fullWidth: true,
|
||||
|
||||
@@ -22,7 +22,11 @@ class _LoginScreenState extends State<LoginScreen> {
|
||||
|
||||
// 로그인 성공 시 콜백 (예: overview로 이동)
|
||||
void _onLoginSuccess() {
|
||||
Navigator.of(context).pushReplacementNamed('/home');
|
||||
// 로그인 성공 시 모든 이전 라우트를 제거하고 홈으로 이동
|
||||
Navigator.of(context).pushNamedAndRemoveUntil(
|
||||
'/home',
|
||||
(route) => false,
|
||||
);
|
||||
}
|
||||
|
||||
@override
|
||||
|
||||
@@ -27,8 +27,6 @@ class _LoginViewRedesignState extends State<LoginViewRedesign>
|
||||
late AnimationController _slideController;
|
||||
late Animation<Offset> _slideAnimation;
|
||||
|
||||
bool _rememberMe = false;
|
||||
|
||||
@override
|
||||
void initState() {
|
||||
super.initState();
|
||||
@@ -80,36 +78,37 @@ class _LoginViewRedesignState extends State<LoginViewRedesign>
|
||||
child: Consumer<LoginController>(
|
||||
builder: (context, controller, _) {
|
||||
return Scaffold(
|
||||
backgroundColor: ShadcnTheme.background,
|
||||
body: SafeArea(
|
||||
child: Center(
|
||||
child: SingleChildScrollView(
|
||||
physics: const BouncingScrollPhysics(),
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.all(ShadcnTheme.spacing6),
|
||||
child: ConstrainedBox(
|
||||
constraints: const BoxConstraints(maxWidth: 400),
|
||||
child: FadeTransition(
|
||||
opacity: _fadeAnimation,
|
||||
child: SlideTransition(
|
||||
position: _slideAnimation,
|
||||
child: Column(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
_buildHeader(),
|
||||
const SizedBox(height: ShadcnTheme.spacing12),
|
||||
_buildLoginCard(),
|
||||
const SizedBox(height: ShadcnTheme.spacing8),
|
||||
_buildFooter(),
|
||||
],
|
||||
backgroundColor: ShadcnTheme.background,
|
||||
body: SafeArea(
|
||||
child: Center(
|
||||
child: SingleChildScrollView(
|
||||
physics: const BouncingScrollPhysics(),
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.all(ShadcnTheme.spacing6),
|
||||
child: ConstrainedBox(
|
||||
constraints: const BoxConstraints(maxWidth: 400),
|
||||
child: FadeTransition(
|
||||
opacity: _fadeAnimation,
|
||||
child: SlideTransition(
|
||||
position: _slideAnimation,
|
||||
child: Column(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
_buildHeader(),
|
||||
const SizedBox(height: ShadcnTheme.spacing12),
|
||||
_buildLoginCard(),
|
||||
const SizedBox(height: ShadcnTheme.spacing8),
|
||||
_buildFooter(),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
);
|
||||
);
|
||||
},
|
||||
),
|
||||
);
|
||||
@@ -234,7 +233,7 @@ class _LoginViewRedesignState extends State<LoginViewRedesign>
|
||||
margin: const EdgeInsets.only(bottom: ShadcnTheme.spacing4),
|
||||
decoration: BoxDecoration(
|
||||
color: ShadcnTheme.destructive.withOpacity(0.1),
|
||||
borderRadius: BorderRadius.circular(ShadcnTheme.borderRadius),
|
||||
borderRadius: BorderRadius.circular(ShadcnTheme.radiusMd),
|
||||
border: Border.all(
|
||||
color: ShadcnTheme.destructive.withOpacity(0.3),
|
||||
),
|
||||
|
||||
@@ -1,60 +1,177 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:superport/services/mock_data_service.dart';
|
||||
import 'package:get_it/get_it.dart';
|
||||
import 'package:superport/data/models/dashboard/equipment_status_distribution.dart';
|
||||
import 'package:superport/data/models/dashboard/expiring_license.dart';
|
||||
import 'package:superport/data/models/dashboard/overview_stats.dart';
|
||||
import 'package:superport/data/models/dashboard/recent_activity.dart';
|
||||
import 'package:superport/services/dashboard_service.dart';
|
||||
import 'package:superport/screens/common/theme_tailwind.dart';
|
||||
|
||||
// 대시보드(Overview) 화면의 상태 및 비즈니스 로직을 담당하는 컨트롤러
|
||||
class OverviewController {
|
||||
final MockDataService dataService;
|
||||
// 대시보드(Overview) 화면의 상태 및 비즈니스 로직을 담답하는 컨트롤러
|
||||
class OverviewController extends ChangeNotifier {
|
||||
final DashboardService _dashboardService = GetIt.instance<DashboardService>();
|
||||
|
||||
int totalCompanies = 0;
|
||||
int totalUsers = 0;
|
||||
int totalEquipmentIn = 0;
|
||||
int totalEquipmentOut = 0;
|
||||
int totalLicenses = 0;
|
||||
|
||||
// 최근 활동 데이터
|
||||
List<Map<String, dynamic>> recentActivities = [];
|
||||
|
||||
OverviewController({required this.dataService});
|
||||
|
||||
// 데이터 로드 및 통계 계산
|
||||
void loadData() {
|
||||
totalCompanies = dataService.getAllCompanies().length;
|
||||
totalUsers = dataService.getAllUsers().length;
|
||||
// 실제 서비스에서는 아래 메서드 구현 필요
|
||||
totalEquipmentIn = 32; // 임시 데이터
|
||||
totalEquipmentOut = 18; // 임시 데이터
|
||||
totalLicenses = dataService.getAllLicenses().length;
|
||||
_loadRecentActivities();
|
||||
// 상태 데이터
|
||||
OverviewStats? _overviewStats;
|
||||
List<RecentActivity> _recentActivities = [];
|
||||
EquipmentStatusDistribution? _equipmentStatus;
|
||||
List<ExpiringLicense> _expiringLicenses = [];
|
||||
|
||||
// 로딩 상태
|
||||
bool _isLoadingStats = false;
|
||||
bool _isLoadingActivities = false;
|
||||
bool _isLoadingEquipmentStatus = false;
|
||||
bool _isLoadingLicenses = false;
|
||||
|
||||
// 에러 상태
|
||||
String? _statsError;
|
||||
String? _activitiesError;
|
||||
String? _equipmentStatusError;
|
||||
String? _licensesError;
|
||||
|
||||
// Getters
|
||||
OverviewStats? get overviewStats => _overviewStats;
|
||||
List<RecentActivity> get recentActivities => _recentActivities;
|
||||
EquipmentStatusDistribution? get equipmentStatus => _equipmentStatus;
|
||||
List<ExpiringLicense> get expiringLicenses => _expiringLicenses;
|
||||
|
||||
bool get isLoading => _isLoadingStats || _isLoadingActivities ||
|
||||
_isLoadingEquipmentStatus || _isLoadingLicenses;
|
||||
|
||||
String? get error {
|
||||
return _statsError ?? _activitiesError ??
|
||||
_equipmentStatusError ?? _licensesError;
|
||||
}
|
||||
|
||||
// 최근 활동 데이터 로드 (임시 데이터)
|
||||
void _loadRecentActivities() {
|
||||
recentActivities = [
|
||||
{
|
||||
'type': '장비 입고',
|
||||
'title': '라우터 입고 처리 완료',
|
||||
'time': '30분 전',
|
||||
'user': '홍길동',
|
||||
'icon': Icons.input,
|
||||
'color': AppThemeTailwind.success,
|
||||
OverviewController();
|
||||
|
||||
// 데이터 로드
|
||||
Future<void> loadData() async {
|
||||
await Future.wait([
|
||||
_loadOverviewStats(),
|
||||
_loadRecentActivities(),
|
||||
_loadEquipmentStatus(),
|
||||
_loadExpiringLicenses(),
|
||||
]);
|
||||
}
|
||||
|
||||
// 개별 데이터 로드 메서드
|
||||
Future<void> _loadOverviewStats() async {
|
||||
_isLoadingStats = true;
|
||||
_statsError = null;
|
||||
notifyListeners();
|
||||
|
||||
final result = await _dashboardService.getOverviewStats();
|
||||
|
||||
result.fold(
|
||||
(failure) {
|
||||
_statsError = failure.message;
|
||||
},
|
||||
{
|
||||
'type': '사용자 추가',
|
||||
'title': '새 관리자 등록',
|
||||
'time': '1시간 전',
|
||||
'user': '김철수',
|
||||
'icon': Icons.person_add,
|
||||
'color': AppThemeTailwind.primary,
|
||||
(stats) {
|
||||
_overviewStats = stats;
|
||||
},
|
||||
{
|
||||
'type': '장비 출고',
|
||||
'title': '모니터 5대 출고 처리',
|
||||
'time': '2시간 전',
|
||||
'user': '이영희',
|
||||
'icon': Icons.output,
|
||||
'color': AppThemeTailwind.warning,
|
||||
);
|
||||
|
||||
_isLoadingStats = false;
|
||||
notifyListeners();
|
||||
}
|
||||
|
||||
Future<void> _loadRecentActivities() async {
|
||||
_isLoadingActivities = true;
|
||||
_activitiesError = null;
|
||||
notifyListeners();
|
||||
|
||||
final result = await _dashboardService.getRecentActivities();
|
||||
|
||||
result.fold(
|
||||
(failure) {
|
||||
_activitiesError = failure.message;
|
||||
},
|
||||
];
|
||||
(activities) {
|
||||
_recentActivities = activities;
|
||||
},
|
||||
);
|
||||
|
||||
_isLoadingActivities = false;
|
||||
notifyListeners();
|
||||
}
|
||||
|
||||
Future<void> _loadEquipmentStatus() async {
|
||||
_isLoadingEquipmentStatus = true;
|
||||
_equipmentStatusError = null;
|
||||
notifyListeners();
|
||||
|
||||
final result = await _dashboardService.getEquipmentStatusDistribution();
|
||||
|
||||
result.fold(
|
||||
(failure) {
|
||||
_equipmentStatusError = failure.message;
|
||||
},
|
||||
(status) {
|
||||
_equipmentStatus = status;
|
||||
},
|
||||
);
|
||||
|
||||
_isLoadingEquipmentStatus = false;
|
||||
notifyListeners();
|
||||
}
|
||||
|
||||
Future<void> _loadExpiringLicenses() async {
|
||||
_isLoadingLicenses = true;
|
||||
_licensesError = null;
|
||||
notifyListeners();
|
||||
|
||||
final result = await _dashboardService.getExpiringLicenses(days: 30);
|
||||
|
||||
result.fold(
|
||||
(failure) {
|
||||
_licensesError = failure.message;
|
||||
},
|
||||
(licenses) {
|
||||
_expiringLicenses = licenses;
|
||||
},
|
||||
);
|
||||
|
||||
_isLoadingLicenses = false;
|
||||
notifyListeners();
|
||||
}
|
||||
|
||||
// 활동 타입별 아이콘과 색상 가져오기
|
||||
IconData getActivityIcon(String activityType) {
|
||||
switch (activityType.toLowerCase()) {
|
||||
case 'equipment_in':
|
||||
case '장비 입고':
|
||||
return Icons.input;
|
||||
case 'equipment_out':
|
||||
case '장비 출고':
|
||||
return Icons.output;
|
||||
case 'user_create':
|
||||
case '사용자 추가':
|
||||
return Icons.person_add;
|
||||
case 'license_create':
|
||||
case '라이선스 등록':
|
||||
return Icons.vpn_key;
|
||||
default:
|
||||
return Icons.notifications;
|
||||
}
|
||||
}
|
||||
|
||||
Color getActivityColor(String activityType) {
|
||||
switch (activityType.toLowerCase()) {
|
||||
case 'equipment_in':
|
||||
case '장비 입고':
|
||||
return AppThemeTailwind.success;
|
||||
case 'equipment_out':
|
||||
case '장비 출고':
|
||||
return AppThemeTailwind.warning;
|
||||
case 'user_create':
|
||||
case '사용자 추가':
|
||||
return AppThemeTailwind.primary;
|
||||
case 'license_create':
|
||||
case '라이선스 등록':
|
||||
return AppThemeTailwind.info;
|
||||
default:
|
||||
return AppThemeTailwind.muted;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -14,41 +14,45 @@ class OverviewScreenRedesign extends StatefulWidget {
|
||||
|
||||
class _OverviewScreenRedesignState extends State<OverviewScreenRedesign> {
|
||||
late final OverviewController _controller;
|
||||
bool _isLoading = true;
|
||||
|
||||
@override
|
||||
void initState() {
|
||||
super.initState();
|
||||
_controller = OverviewController(dataService: MockDataService());
|
||||
_controller = OverviewController();
|
||||
_loadData();
|
||||
}
|
||||
|
||||
Future<void> _loadData() async {
|
||||
setState(() {
|
||||
_isLoading = true;
|
||||
});
|
||||
await _controller.loadDashboardData();
|
||||
}
|
||||
|
||||
await Future.delayed(const Duration(milliseconds: 800));
|
||||
_controller.loadData();
|
||||
|
||||
setState(() {
|
||||
_isLoading = false;
|
||||
});
|
||||
@override
|
||||
void dispose() {
|
||||
_controller.dispose();
|
||||
super.dispose();
|
||||
}
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
if (_isLoading) {
|
||||
return _buildLoadingState();
|
||||
}
|
||||
return ChangeNotifierProvider.value(
|
||||
value: _controller,
|
||||
child: Consumer<OverviewController>(
|
||||
builder: (context, controller, child) {
|
||||
if (controller.isLoading) {
|
||||
return _buildLoadingState();
|
||||
}
|
||||
|
||||
return Container(
|
||||
color: ShadcnTheme.background,
|
||||
child: SingleChildScrollView(
|
||||
padding: const EdgeInsets.all(24),
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
if (controller.error != null) {
|
||||
return _buildErrorState(controller.error!);
|
||||
}
|
||||
|
||||
return Container(
|
||||
color: ShadcnTheme.background,
|
||||
child: SingleChildScrollView(
|
||||
padding: const EdgeInsets.all(24),
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
// 환영 섹션
|
||||
ShadcnCard(
|
||||
padding: const EdgeInsets.all(32),
|
||||
@@ -164,6 +168,9 @@ class _OverviewScreenRedesignState extends State<OverviewScreenRedesign> {
|
||||
],
|
||||
),
|
||||
),
|
||||
);
|
||||
},
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
@@ -183,6 +190,34 @@ class _OverviewScreenRedesignState extends State<OverviewScreenRedesign> {
|
||||
);
|
||||
}
|
||||
|
||||
Widget _buildErrorState(String error) {
|
||||
return Container(
|
||||
color: ShadcnTheme.background,
|
||||
child: Center(
|
||||
child: Column(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
Icon(
|
||||
Icons.error_outline,
|
||||
size: 48,
|
||||
color: ShadcnTheme.error,
|
||||
),
|
||||
const SizedBox(height: ShadcnTheme.spacing4),
|
||||
Text('오류가 발생했습니다', style: ShadcnTheme.headingH4),
|
||||
const SizedBox(height: ShadcnTheme.spacing2),
|
||||
Text(error, style: ShadcnTheme.bodyMuted),
|
||||
const SizedBox(height: ShadcnTheme.spacing4),
|
||||
ShadcnButton(
|
||||
text: '다시 시도',
|
||||
onPressed: _loadData,
|
||||
variant: ShadcnButtonVariant.primary,
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
Widget _buildLeftColumn() {
|
||||
return Column(
|
||||
children: [
|
||||
@@ -261,7 +296,27 @@ class _OverviewScreenRedesignState extends State<OverviewScreenRedesign> {
|
||||
],
|
||||
),
|
||||
const SizedBox(height: 16),
|
||||
...List.generate(5, (index) => _buildActivityItem(index)),
|
||||
Consumer<OverviewController>(
|
||||
builder: (context, controller, child) {
|
||||
final activities = controller.recentActivities ?? [];
|
||||
if (activities.isEmpty) {
|
||||
return Padding(
|
||||
padding: const EdgeInsets.symmetric(vertical: 20),
|
||||
child: Center(
|
||||
child: Text(
|
||||
'최근 활동이 없습니다',
|
||||
style: ShadcnTheme.bodyMuted,
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
return Column(
|
||||
children: activities.take(5).map((activity) =>
|
||||
_buildActivityItem(activity),
|
||||
).toList(),
|
||||
);
|
||||
},
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
@@ -376,41 +431,41 @@ class _OverviewScreenRedesignState extends State<OverviewScreenRedesign> {
|
||||
);
|
||||
}
|
||||
|
||||
Widget _buildActivityItem(int index) {
|
||||
final activities = [
|
||||
{
|
||||
'icon': Icons.inventory,
|
||||
'title': '장비 입고 처리',
|
||||
'subtitle': '크레인 #CR-001 입고 완료',
|
||||
'time': '2분 전',
|
||||
},
|
||||
{
|
||||
'icon': Icons.local_shipping,
|
||||
'title': '장비 출고 처리',
|
||||
'subtitle': '포클레인 #FK-005 출고 완료',
|
||||
'time': '5분 전',
|
||||
},
|
||||
{
|
||||
'icon': Icons.business,
|
||||
'title': '회사 등록',
|
||||
'subtitle': '새로운 회사 "ABC건설" 등록',
|
||||
'time': '10분 전',
|
||||
},
|
||||
{
|
||||
'icon': Icons.person_add,
|
||||
'title': '사용자 추가',
|
||||
'subtitle': '신규 사용자 계정 생성',
|
||||
'time': '15분 전',
|
||||
},
|
||||
{
|
||||
'icon': Icons.settings,
|
||||
'title': '시스템 점검',
|
||||
'subtitle': '정기 시스템 점검 완료',
|
||||
'time': '30분 전',
|
||||
},
|
||||
];
|
||||
Widget _buildActivityItem(dynamic activity) {
|
||||
// 아이콘 매핑
|
||||
IconData getActivityIcon(String type) {
|
||||
switch (type) {
|
||||
case 'equipment_in':
|
||||
return Icons.inventory;
|
||||
case 'equipment_out':
|
||||
return Icons.local_shipping;
|
||||
case 'company':
|
||||
return Icons.business;
|
||||
case 'user':
|
||||
return Icons.person_add;
|
||||
default:
|
||||
return Icons.settings;
|
||||
}
|
||||
}
|
||||
|
||||
final activity = activities[index];
|
||||
// 색상 매핑
|
||||
Color getActivityColor(String type) {
|
||||
switch (type) {
|
||||
case 'equipment_in':
|
||||
return ShadcnTheme.success;
|
||||
case 'equipment_out':
|
||||
return ShadcnTheme.warning;
|
||||
case 'company':
|
||||
return ShadcnTheme.info;
|
||||
case 'user':
|
||||
return ShadcnTheme.primary;
|
||||
default:
|
||||
return ShadcnTheme.mutedForeground;
|
||||
}
|
||||
}
|
||||
|
||||
final color = getActivityColor(activity.type);
|
||||
final dateFormat = DateFormat('MM/dd HH:mm');
|
||||
|
||||
return Padding(
|
||||
padding: const EdgeInsets.symmetric(vertical: 8),
|
||||
@@ -419,12 +474,12 @@ class _OverviewScreenRedesignState extends State<OverviewScreenRedesign> {
|
||||
Container(
|
||||
padding: const EdgeInsets.all(8),
|
||||
decoration: BoxDecoration(
|
||||
color: ShadcnTheme.success.withOpacity(0.1),
|
||||
color: color.withOpacity(0.1),
|
||||
borderRadius: BorderRadius.circular(6),
|
||||
),
|
||||
child: Icon(
|
||||
activity['icon'] as IconData,
|
||||
color: ShadcnTheme.success,
|
||||
getActivityIcon(activity.type),
|
||||
color: color,
|
||||
size: 16,
|
||||
),
|
||||
),
|
||||
@@ -434,17 +489,20 @@ class _OverviewScreenRedesignState extends State<OverviewScreenRedesign> {
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Text(
|
||||
activity['title'] as String,
|
||||
activity.title,
|
||||
style: ShadcnTheme.bodyMedium,
|
||||
),
|
||||
Text(
|
||||
activity['subtitle'] as String,
|
||||
activity.description,
|
||||
style: ShadcnTheme.bodySmall,
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
Text(activity['time'] as String, style: ShadcnTheme.bodySmall),
|
||||
Text(
|
||||
dateFormat.format(activity.createdAt),
|
||||
style: ShadcnTheme.bodySmall,
|
||||
),
|
||||
],
|
||||
),
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user