PatternSerializer class
Handles serialization and deserialization of haptic patterns
This class provides utilities for converting haptic patterns to and from JSON format for storage and transmission.
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
-
exportWithMetadata(
HapticPattern pattern, {required String name, String? description}) → Map< String, dynamic> - Exports a pattern with metadata
-
fromJson(
Map< String, dynamic> json) → HapticPattern - Converts a JSON map to a haptic pattern
-
fromJsonString(
String json) → HapticPattern - Converts a JSON string to a haptic pattern
-
importFromMetadata(
Map< String, dynamic> data) → HapticPattern - Imports a pattern from metadata
-
prettyPrint(
HapticPattern pattern) → String - Pretty prints a pattern for debugging
-
toJson(
HapticPattern pattern) → Map< String, dynamic> - Converts a haptic pattern to a JSON map
-
toJsonString(
HapticPattern pattern) → String - Converts a haptic pattern to a JSON string