stringToMaskFilter function

MaskFilter? stringToMaskFilter(
  1. String data
)

Implementation

MaskFilter? stringToMaskFilter(String data) {
  final String style = data.substring(data.indexOf('('), data.indexOf(','));
  final BlurStyle? blurStyle =
      ExEnum.tryParse<BlurStyle>(BlurStyle.values, style);

  final double sigma =
      double.parse(data.substring(data.indexOf(',') + 1, data.indexOf(')')));

  return blurStyle != null ? MaskFilter.blur(blurStyle, sigma) : null;
}