radius method
Implementation
@preferInline
Radius radius({
String key = FlutterPropertyKeys.radius,
Radius defaultValue = Radius.zero,
Object? target,
bool warmUp = false,
}) {
final value = _readProp(key, target, warmUp);
if (value is Radius) return value;
if (value == null) return defaultValue;
switch (value) {
case List<num>():
if (envAttributeWarmUpEnabled) {
if (warmUp) {
return Radius.elliptical(
value[0].toDouble(),
value[1].toDouble(),
);
} else {
return _json[key] = Radius.elliptical(
value[0].toDouble(),
value[1].toDouble(),
);
}
} else {
return _json[key] = Radius.elliptical(
value[0].toDouble(),
value[1].toDouble(),
);
}
case num():
if (envAttributeWarmUpEnabled) {
if (warmUp) {
return Radius.circular(
value.toDouble(),
);
} else {
return _json[key] = Radius.circular(
value.toDouble(),
);
}
} else {
return _json[key] = Radius.circular(
value.toDouble(),
);
}
default:
return defaultValue;
}
}