ReactPattern class

If pattern starts with / and has no hash ReactPattern automatically prefixes pattern with '/#'

var pattern = new ReactPattern(r'/test');
expect(pattern.matches('/#/test'), true);
Inheritance

Constructors

ReactPattern(String pattern)

Properties

hashCode → int
The hash code for this object. [...]
read-only, inherited
pattern → String
final, inherited
regex → RegExp
read-only, inherited
runtimeType → Type
A representation of the runtime type of the object.
read-only, inherited

Methods

allMatches(String str, [int start = 0]) → Iterable<Match>
Match this pattern against the string repeatedly. [...]
inherited
expand(Iterable args, {bool useFragment: false}) → String
Replaces pattern-groups with args
inherited
matchAsPrefix(String string, [int start = 0]) → Match
Match this pattern against the start of string. [...]
inherited
matches(String str) → bool
Returns true if this pattern matches path.
inherited
matchesNonFragment(String str) → bool
Returns true if the path portion of the pattern, the part before the fragment, matches str. If there is no fragment in the pattern, this is equivalent to calling matches. [...]
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed.
inherited
parse(String path) → List<String>
Parses a URL path, or path + fragment, and returns the group matches. Throws ArgumentError if this pattern does not match path.
inherited
toString() → String
Returns a string representation of this object.
inherited

Operators

operator ==(dynamic other) → bool
The equality operator. [...]
inherited