signals_store_annotation

Annotations for the reactive stores of signals_store and their code generator.

Installation

dependencies:
  signals_store_annotation:
    path: ../../packages/signals_store_annotation  # or git/url

Usage

The @Store annotation marks an abstract class as a store description: its abstract fields (getter + setter) are turned by the code generator into reactive Signal backends.

import 'package:signals_store_annotation/signals_store_annotation.dart';

@Store(name: 'CounterStore')
abstract class CounterImpl {
  abstract int count;
  abstract String name;
}

Exactly one @Store annotation is allowed per class; multiple annotations raise a codegen error.

  • signals_store_generator — the code generator that produces store implementations.
  • signals_store — the runtime ReactiveStore (an alternative to codegen based on noSuchMethod).

Libraries

signals_store_annotation
Annotations for signals_store code generation.