autoequal_gen 0.9.1 copy "autoequal_gen: ^0.9.1" to clipboard
autoequal_gen: ^0.9.1 copied to clipboard

Code generator which can simplify work with 'equatable'. It will generate 'List<Object?> props' private extensions for all annotated classes.

example/main.dart

import 'package:autoequal/autoequal.dart';
import 'package:equatable/equatable.dart';

part 'main.g.dart';

@autoequal
class Example1Class extends Equatable {
  Example1Class({
    required this.value,
    this.ignored,
    this.optional,
  });

  final String value;
  final String? optional;

  @ignore
  final String? ignored;

  @override
  List<Object?> get props => _$props;
}

@autoequal
class Example2Class with EquatableMixin {
  const Example2Class({
    required this.value,
    this.ignored,
    this.optional,
  });

  final String value;
  final String? optional;

  @ignore
  final String? ignored;

  @override
  List<Object?> get props => _$props;
}
6
likes
140
pub points
63%
popularity

Publisher

verified publishermrgnhnt.com

Code generator which can simplify work with 'equatable'. It will generate 'List<Object?> props' private extensions for all annotated classes.

Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (LICENSE)

Dependencies

analyzer, autoequal, build, change_case, code_builder, dart_style, meta, path, source_gen, source_span

More

Packages that depend on autoequal_gen