forPath method Null safety

Syntax forPath(
  1. String path
)

Returns the default syntax to use for a file loaded from path.

Implementation

static Syntax forPath(String path) {
  switch (p.extension(path)) {
    case '.sass':
      return Syntax.sass;
    case '.css':
      return Syntax.css;
    default:
      return Syntax.scss;
  }
}