resolveFlexShrink static method

int? resolveFlexShrink(
  1. BuildContext context,
  2. FlyStyle style
)

Resolves flex shrink value from FlyStyle

Implementation

static int? resolveFlexShrink(BuildContext context, FlyStyle style) {
  if (style.shrink == null) return null;

  if (style.shrink is int) {
    return style.shrink;
  }

  if (style.shrink is String) {
    return int.tryParse(style.shrink);
  }

  return null;
}