StatePathFilter class

Utility for filtering state data by specific field paths.

This class provides functionality to extract only specified paths from nested Map structures using dot notation (e.g., "user.profile.email").

Path Notation:

  • Dot notation: "user.profile.email" extracts data["user"]["profile"]["email"]
  • Top-level fields: "name" extracts data["name"]

Behavior:

  • Missing paths are silently ignored
  • Nested structure is preserved (e.g., "profile.email" keeps the profile map)
  • Returns a new Map containing only the specified paths

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited

Static Methods

filterByPaths(Map<String, dynamic> data, List<String> paths) Map<String, dynamic>
Filters a map to include only the specified paths.
getValueAtPath(Map<String, dynamic> data, String path) → dynamic
Gets the value at a specific path in a nested map.