With macros on the horizon, it will be possible to implement equatable using macros which will both improve the performance of equality comparisons and significantly simplify the usage.
Before
class Person extends Equatable {
const Person({required this.name});
final String name;
@override
List<Object> get props => [name];
}
After
@Equatable()
class Person {
const Person({required this.name});
final String name;
}
See also https://github.com/felangel/data_class which will be built on top of package:equatable.
With macros on the horizon, it will be possible to implement equatable using macros which will both improve the performance of equality comparisons and significantly simplify the usage.
Before
After
See also https://github.com/felangel/data_class which will be built on top of
package:equatable.