parse static method

HFilter? parse(
  1. String s, [
  2. bool checked = true
])

/////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////// Decode a string into a HFilter; return null or throw ParseError if not formatted correctly.

Implementation

// Encoding
//////////////////////////////////////////////////////////////////////////

  /// Decode a string into a HFilter; return null or throw
  /// ParseError if not formatted correctly.
  static HFilter? parse(String s, [bool checked = true]) {
    try {
      return _FilterParser(s).parse();
    } catch (e) {
      if (!checked) return null;
      if (e is ParseError) rethrow;
      throw ParseError(s);
    }
  }