getInt static method
Get an integer value from uiConfig with a default
Implementation
static int getInt(
Map<String, dynamic>? uiConfig,
String key,
int defaultValue,
) {
if (uiConfig == null) return defaultValue;
final value = uiConfig[key];
if (value == null) return defaultValue;
if (value is int) return value;
if (value is double) return value.toInt();
if (value is String) return int.tryParse(value) ?? defaultValue;
return defaultValue;
}