import 'package:flutter/material.dart'; class NoticeScreen extends StatelessWidget { const NoticeScreen({super.key}); final List> notices = const [ { 'title': 'RUP 서비스 런칭 안내', 'date': '2024.01.20', 'content': '반려동물 통합 관리 플랫폼 RUP가 정식 런칭되었습니다. 많은 이용 부탁드립니다.', }, { 'title': '시스템 점검 안내', 'date': '2024.01.15', 'content': '더나은 서비스를 위해 시스템 점검이 진행될 예정입니다.\n일시: 2024.01.25 02:00 ~ 04:00', }, { 'title': '이용약관 개정 안내', 'date': '2024.01.10', 'content': '서비스 이용약관이 일부 개정되었습니다. 주요 변경사항을 확인해주세요.', }, ]; @override Widget build(BuildContext context) { return Scaffold( backgroundColor: Colors.white, appBar: AppBar( title: const Text( '공지사항', style: TextStyle( fontFamily: 'SCDream', fontWeight: FontWeight.bold, color: Colors.black, ), ), centerTitle: true, backgroundColor: Colors.white, elevation: 0, leading: IconButton( icon: const Icon(Icons.arrow_back_ios, color: Colors.black, size: 20), onPressed: () => Navigator.pop(context), ), ), body: ListView.separated( itemCount: notices.length, separatorBuilder: (context, index) => const Divider(height: 1, color: Color(0xFFEEEEEE)), itemBuilder: (context, index) { final notice = notices[index]; return ExpansionTile( tilePadding: const EdgeInsets.symmetric( horizontal: 20, vertical: 8, ), title: Text( notice['title']!, style: const TextStyle( fontFamily: 'SCDream', fontSize: 16, fontWeight: FontWeight.w500, color: Colors.black87, ), ), subtitle: Padding( padding: const EdgeInsets.only(top: 4), child: Text( notice['date']!, style: TextStyle( fontFamily: 'SCDream', fontSize: 12, color: Colors.grey[500], ), ), ), children: [ Container( width: double.infinity, padding: const EdgeInsets.symmetric( horizontal: 20, vertical: 20, ), color: Colors.grey[50], child: Text( notice['content']!, style: const TextStyle( fontFamily: 'SCDream', fontSize: 14, height: 1.5, color: Colors.black87, ), ), ), ], ); }, ), ); } }