I'm trying to replicate the facebooks emoji reactions and thus found and decided to use the "
CodePudding user response:
you can wrap your FaIcon in Padding widget as below
final List<Reaction<String>> _emojisList = [
Reaction(
icon: Padding(
padding: const EdgeInsets.symmetric(horizontal: 15.0),
child: FaIcon(
FontAwesomeIcons.solidThumbsUp,
color: Colors.blue,
size: 30,
),
),
value: 'thumbsUp'),
Reaction(
icon: Padding(
padding: const EdgeInsets.symmetric(horizontal: 15.0),
child: FaIcon(
FontAwesomeIcons.solidHeart,
color: Colors.red,
size: 30,
),
),
value: 'solidHeart'),
Reaction(
icon: Padding(
padding: const EdgeInsets.symmetric(horizontal: 15.0),
child: FaIcon(
FontAwesomeIcons.handHoldingHeart,
color: Colors.yellow,
size: 30,
),
),
value: 'handHoldingHeart',
),
];
CodePudding user response:
replace _emojisList to this
final List<Reaction<String>> _emojisList = [
Reaction(
icon: const Padding(
padding: EdgeInsets.symmetric(
horizontal: 16.0,
),
child: FaIcon(
FontAwesomeIcons.solidThumbsUp,
color: Colors.blue,
size: 30,
),
),
value: 'thumbsUp'),
Reaction(
icon: const Padding(
padding: EdgeInsets.symmetric(
horizontal: 16.0,
),
child: FaIcon(
FontAwesomeIcons.solidHeart,
color: Colors.red,
size: 30,
),
),
value: 'solidHeart'),
Reaction(
icon: const Padding(
padding: EdgeInsets.symmetric(
horizontal: 16.0,
),
child: FaIcon(
FontAwesomeIcons.handHoldingHeart,
color: Colors.yellow,
size: 30,
),
),
value: 'handHoldingHeart',
),
];