Here, oldWidget.config != widget.config will always true even they have same values inside as it is not comparing the instance member values of 2 objects. That's why the rebuild happens on every setState() if we provide a Config() object for customization.
So I have Overridden the == operator in the Config class to compare if 2 objects are the same or not according to their values. The hashCode property is also overridden to maintain consistency.
Attempt to fix #27
Check this line: https://github.com/Fintasys/emoji_picker_flutter/blob/master/lib/src/emoji_picker.dart#L113
Here,
oldWidget.config != widget.config
will always true even they have same values inside as it is not comparing the instance member values of 2 objects. That's why the rebuild happens on every setState() if we provide a Config() object for customization.So I have Overridden the == operator in the Config class to compare if 2 objects are the same or not according to their values. The hashCode property is also overridden to maintain consistency.