resolvePosition static method
Resolves position value from FlyStyle
Implementation
static double? resolvePosition(
BuildContext context,
FlyStyle style,
String property,
) {
dynamic value;
switch (property) {
case 'top':
value = style.top;
break;
case 'right':
value = style.right;
break;
case 'bottom':
value = style.bottom;
break;
case 'left':
value = style.left;
break;
default:
return null;
}
if (value == null) return null;
// Handle string values (spacing tokens)
if (value is String) {
final spacing = FlyTheme.of(context).spacing;
return FlyValue.resolveDouble(value, context, spacing);
}
// Handle numeric values
if (value is num) {
return value.toDouble();
}
return null;
}