Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
    lsaudon
    @lsaudon

    I don't know how to change my code.

    abstract class GeocoderState extends Equatable {}
    
    class GeocoderInitialized extends GeocoderState {}
    class GeocoderInitialized extends GeocoderState {
      @override
      List<Object> get props => null;
    }

    or

    class GeocoderInitialized extends GeocoderState {
      @override
      List<Object> get props => [];
    }

    It's not possible to put anything ?

    Felix Angelov
    @felangel
    The second one 👍
    Yup it ensures you don’t forget to override props
    lsaudon
    @lsaudon
    Thanks you
    Michael Joseph Rosenthal
    @micimize
    Hi - I was wondering why equatable requires immutable classes? I can't see anything in the source code that indicates it is necessary
    Felix Angelov
    @felangel
    Hi @micimize :wave:
    Michael Joseph Rosenthal
    @micimize
    @felangel aaah, I didn't know that! == overrides really have a lot of pitfalls, huh. Mad e small PR to add a note in the docs felangel/equatable#47
    Felix Angelov
    @felangel
    Thanks merged it!
    Piero Marcelo Ulloa Mora
    @Piero512
    Hey, I was using equatable and I noticed some features I would like. I usually have one prop that is actually relevant for equality (think replacing keys in a map), but I would like for Equatable to print all the props (or maybe a list of props).
    I think I could implement deep equality if needed, so I don't know if I missed it, but maybe is there a way to get equatable as a mixin for printing properties (so it doesn't break current apps)