fromCss static method

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

Implementation

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