SignalModelOptions class
Options for configuring a SignalModel.
Provides configuration for debug labeling (name) and whether to automatically wrap Map functions in transaction-safe, batched actions (wrapInAction).
Example Usage
import 'package:preact_signals/preact_signals.dart';
final options = const SignalModelOptions(
name: 'user-profile-model',
wrapInAction: true,
);
Constructors
- SignalModelOptions({String? name, bool wrapInAction = true})
-
Creates a new instance of SignalModelOptions.
const
Properties
- hashCode → int
-
The hash code for this object.
no setteroverride
- name → String?
-
The name or debug label of the model.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- wrapInAction → bool
-
Whether to automatically wrap returned Map functions in actions.
Defaults to true.
final
Methods
-
copyWith(
{String? name, bool? wrapInAction}) → SignalModelOptions - Copy options with new values.
-
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.
override