728x90
반응형
기능이 다 갖춰졌다고 해서, 앱이 완성된 건 아니다.
사용자가 처음 앱을 열었을 때 느끼는 **“느낌”**이 앱의 첫인상을 좌우한다.
이번 글에서는 Flutter의 ThemeData를 활용해 전체적인 색감과 스타일을 감성적으로 다듬어보고,
글자, 여백, 그림자 등 작은 요소들에 생기를 불어넣어보자.
🎨 테마 설정하기 (ThemeData)
MaterialApp에서 theme 속성을 통해 전역 테마를 지정할 수 있다.
MaterialApp(
theme: ThemeData(
primarySwatch: Colors.teal,
scaffoldBackgroundColor: Color(0xFFF9F9F9),
fontFamily: 'Pretendard',
textTheme: TextTheme(
bodyMedium: TextStyle(fontSize: 16, color: Colors.black87),
titleLarge: TextStyle(fontWeight: FontWeight.bold, fontSize: 22),
),
appBarTheme: AppBarTheme(
backgroundColor: Colors.white,
elevation: 1,
titleTextStyle: TextStyle(
color: Colors.black,
fontSize: 20,
fontWeight: FontWeight.w600,
),
iconTheme: IconThemeData(color: Colors.teal),
),
),
)
위 코드는 전체 앱의 배경색, 기본 폰트, AppBar 스타일 등을 감성적으로 맞춰준다.
🌿 커스텀 위젯 스타일링 팁
각 요소에 감성을 더하려면 아래와 같은 디테일을 살리는 것이 좋다:
- Card: 둥근 테두리, 그림자 효과 추가
- ListTile: padding 조절, leading 아이콘 활용
- ElevatedButton: 버튼 색상, 둥글기, 글자 크기 조정
Card(
shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(16)),
elevation: 3,
margin: EdgeInsets.symmetric(vertical: 8, horizontal: 16),
child: ListTile(
leading: Icon(Icons.note, color: Colors.teal),
title: Text(post.title, style: Theme.of(context).textTheme.titleLarge),
subtitle: Text(post.content, maxLines: 1, overflow: TextOverflow.ellipsis),
),
)
💡 폰트 바꾸기
Google Fonts에서 원하는 감성 폰트를 가져와 적용할 수 있다.
예: Noto Sans, Pretendard, Open Sans 등
// pubspec.yaml
fonts:
- family: Pretendard
fonts:
- asset: assets/fonts/Pretendard-Regular.ttf
그 후 ThemeData에 fontFamily 옵션을 지정하면 전체 앱에 적용된다.
🌅 다크 모드 대응
아래처럼 darkTheme도 지정해두면 다크모드에서도 감성 유지 가능:
darkTheme: ThemeData.dark().copyWith(
scaffoldBackgroundColor: Colors.black,
appBarTheme: AppBarTheme(backgroundColor: Colors.grey[900]),
)
🌱 다음 단계
지금까지 게시판 앱의 전체 기능과 UI를 마무리했다.
다음 글에서는 이 앱을 실제 배포하는 방법, APK 파일 만들기까지 함께 해보자.
✍️ 이 글은 터미널 밖으로 나온 개발자의 Flutter 앱 만들기 여정입니다.
728x90
반응형
'Flutter > Flutter 게시판 앱 만들기' 카테고리의 다른 글
| Flutter 게시판 앱 만들기 — 북마크로 찜한 글만 모아보기 (0) | 2025.05.21 |
|---|---|
| Flutter 게시판 앱 만들기 — 실시간으로 게시글 찾기 (0) | 2025.05.21 |
| Flutter 게시판 앱 만들기 — 게시글 수정 & 삭제 기능 추가하기 (0) | 2025.05.21 |
| Flutter 게시판 앱 만들기 — 상태 관리와 SharedPreferences 적용하기 (0) | 2025.05.21 |
| Flutter 게시판 앱 만들기 — TextField와 Form으로 완성하는 입력 폼 (0) | 2025.05.20 |
