알림, Toast, 위젯 커스터마이징
lib/design_config.dart에서 관리합니다.
class DesignConfig {
static final notification = NotificationDesign();
static final toast = ToastDesign();
static final widget = WidgetDesign();
static final splash = SplashDesign();
}
class NotificationDesign {
Color get accentColor => Color(0xFF667EEA);
Color get backgroundColor => Colors.white;
Color get textColor => Colors.black87;
}
// android/app/src/main/res/drawable/
notification_icon.png // 기본 아이콘
notification_small.png // 작은 아이콘
// android/app/src/main/res/raw/
notification_sound.mp3
class ToastDesign {
Color get backgroundColor => Colors.black87;
Color get textColor => Colors.white;
double get fontSize => 16.0;
}
ToastGravity get position => ToastGravity.BOTTOM;
int get duration => Toast.LENGTH_SHORT;
android_widget_templates/widget_layout.xml
<LinearLayout
android:background="@drawable/widget_background"
android:padding="16dp">
<TextView
android:id="@+id/widget_title"
android:textSize="18sp"
android:textColor="#FFFFFF" />
<TextView
android:id="@+id/widget_value"
android:textSize="32sp"
android:textColor="#667EEA" />
</LinearLayout>
android_widget_templates/widget_background.xml
<shape xmlns:android="...">
<solid android:color="#FFFFFF" />
<corners android:radius="16dp" />
<padding android:left="16dp" />
</shape>
android_splash_templates/colors.xml
<color name="splash_background">#667EEA</color>
<color name="splash_logo">#FFFFFF</color>
// android/app/src/main/res/
drawable/splash_logo.png // 일반 해상도
drawable-hdpi/splash_logo.png // 고해상도
class DarkTheme {
static final notification = NotificationDesign(
accentColor: Color(0xFF667EEA),
backgroundColor: Color(0xFF1A202C),
textColor: Colors.white,
);
}
class LightTheme {
static final notification = NotificationDesign(
accentColor: Color(0xFF667EEA),
backgroundColor: Colors.white,
textColor: Colors.black87,
);
}
lib/design_config.dart - Dart 설정android_widget_templates/ - 위젯 템플릿android_splash_templates/ - 스플래시 템플릿android/app/src/main/res/ - 리소스 파일
디자인 설정 후 Flutter 앱을 다시 빌드하세요!
flutter run