fromMap static method
Parses a Map<String, dynamic> into a SplashConfig.
Implementation
static SplashConfig fromMap(Map<String, dynamic> map) {
final animationStr = map['animation'] as String? ?? 'fade';
final durationMs = (map['duration'] as int?) ?? 2500;
final typeStr = map['type'] as String? ?? 'logo_center';
final appName = map['app_name'] as String?;
final tagline = map['tagline'] as String?;
final bgColorStr = map['background_color'] as String?;
return SplashConfig(
durationMs: durationMs,
animation: _parseAnimation(animationStr, durationMs),
backgroundColor: bgColorStr != null ? _parseColor(bgColorStr) : null,
appName: appName,
tagline: tagline,
layoutType: _parseLayoutType(typeStr),
showLoader: map['show_loader'] as bool? ?? false,
);
}