fromCss static method

Map<String, Style> fromCss(
  1. String css,
  2. OnCssParseError? onCssParseError
)

Implementation

static Map<String, Style> fromCss(String css, OnCssParseError? onCssParseError) {
  final declarations = parseExternalCss(css, onCssParseError);
  Map<String, Style> styleMap = {};
  declarations.forEach((key, value) {
    styleMap[key] = declarationsToStyle(value);
  });
  return styleMap;
}