reducer_extension_gen 0.0.2
reducer_extension_gen: ^0.0.2 copied to clipboard

Dart native

Automatically generating `reducer` extensions code for classes with `@actionReducer` annotation.

example/example.dart

import 'package:meta/meta.dart' show immutable;
import 'package:reducer_extension/reducer_extension.dart';
import 'package:redux/redux.dart';

/// Make sure that `part` is specified, even before launching the builder
part 'example.g.dart';

@actionReducer
@immutable
class SimpleObject {
  final String id;
  final int value;

  const SimpleObject({this.id, this.value});

  // Make sure you implement the copyWith pattern
  SimpleObject copyWith({String id, int value}) => SimpleObject(id: id ?? this.id, value: value ?? this.value);
}
0
likes
90
pub points
0%
popularity

Automatically generating `reducer` extensions code for classes with `@actionReducer` annotation.

Homepage
Repository (GitHub)
View/report issues

Documentation

API reference

Uploader

julien.zarka@mobile-devices.fr

License

MIT (LICENSE)

Dependencies

analyzer, build, logging, reducer_extension, source_gen

More

Packages that depend on reducer_extension_gen