favorite_button

How to use it.

the default effects is Icons.favorite

  FavoriteButton(
            valueChanged: (_) {
            },
          ),

and you can also define custom effects.

 FavoriteButton(
            valueChanged: (_isFavorite) {
              print('Is Favorite $_isFavorite)');
            },
          )

parameters

parameterdescriptiondefault
iconSizesize of button widget60.0
iconColorcolor of button widgetred for heart and yellow for star button respectively
valueChangedFunction that returns boolean value for current state of buttonThis is a required parameter

more detail

Libraries

favorite_button