resolveInset static method

double? resolveInset(
  1. BuildContext context,
  2. FlyStyle style
)

Resolves inset value from FlyStyle

Implementation

static double? resolveInset(BuildContext context, FlyStyle style) {
  if (style.inset == null) return null;

  // Handle string values (spacing tokens)
  if (style.inset is String) {
    final spacing = FlyTheme.of(context).spacing;
    return FlyValue.resolveDouble(style.inset, context, spacing);
  }

  // Handle numeric values
  if (style.inset is num) {
    return style.inset.toDouble();
  }

  return null;
}