GeekAbdelouahed / flutter-reaction-button

Flutter Reaction Button is a customizable Flutter package that allows you to easily create interactive buttons with reaction emojis, similar to Facebook's iconic reaction buttons.
https://pub.dev/packages/flutter_reaction_button
MIT License
215 stars 78 forks source link

Change title background color #15

Closed photoplyr closed 3 years ago

photoplyr commented 3 years ago

Hi I was looking at the src and noticed that the background on the title is transparent, are you going to extend the code base to support different title back ground colors and shapes?

GeekAbdelouahed commented 3 years ago

@photoplyr you can customize it by pass it in the widget title like a Container and give it background color. example:

Reaction(
    title: Container(
        padding: const EdgeInsets.symmetric(horizontal: 7.5, vertical: 2.5),
        decoration: BoxDecoration(
          color: Colors.red,
          borderRadius: BorderRadius.circular(15),
        ),
        child: Text(
          title,
          style: TextStyle(
            color: Colors.white,
            fontSize: 10,
            fontWeight: FontWeight.bold,
          ),
        ),
      ),
  )