SignalModelOptions#
Kind:
class |
Package: package:preact_signals
Class: SignalModelOptions#
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,
);
Members of SignalModelOptions#
| Member | Type | Signature | Description |
|---|---|---|---|
| name | field |
dart String? name |
The name or debug label of the model. |
| wrapInAction | field |
dart bool wrapInAction |
Whether to automatically wrap returned Map functions in actions. |
| SignalModelOptions | constructor |
dart SignalModelOptions({this.name, this.wrapInAction = true}) |
Creates a new instance of SignalModelOptions. |
| copyWith | method |
dart SignalModelOptions copyWith({String? name, bool? wrapInAction}) |
Copy options with new values. |
| == | method |
dart bool ==(Object other) |
|
| hashCode | method |
dart int hashCode |
References#
The SignalModelOptions type is referenced and used in the following pages: