getDefaultConfig static method
获取默认配置
Implementation
static ComToastConfig getDefaultConfig(ComToastType type) {
return switch (type) {
ComToastType.success => const ComToastConfig(
type: ComToastType.success,
icon: Icons.check_circle,
iconColor: Color(0xFF10B981),
),
ComToastType.error => const ComToastConfig(
type: ComToastType.error,
icon: Icons.error,
iconColor: Color(0xFFEF4444),
),
ComToastType.warning => const ComToastConfig(
type: ComToastType.warning,
icon: Icons.warning,
iconColor: Color(0xFFF59E0B),
),
ComToastType.info => const ComToastConfig(
type: ComToastType.info,
icon: Icons.info,
iconColor: Color(0xFF3B82F6),
),
ComToastType.loading => const ComToastConfig(
type: ComToastType.loading,
duration: Duration.zero,
),
_ => const ComToastConfig(),
};
}