getStyleByName method

WidgetStyle? getStyleByName(
  1. String name
)

Gets a style by name.

Returns a WidgetStyle instance for the given name. Returns null if the style name is not found.

Implementation

WidgetStyle? getStyleByName(String name) {
  final styleType = WidgetStyleType.fromString(name);
  if (styleType == null) return null;
  return getStyle(styleType);
}