flutter reaction button
flutter button reaction plugin . it is fully customizable widget such as facebook reaction button
usage
this is example flutter reaction button:
flutterreactionbutton(
onreactionchanged: (reaction) {
print('reaction changed');
},
reactions: <reaction>[
reaction(
previewicon: buildwidgetpreview(
title: 'english',
icon: 'united-kingdom-round.png',
),
icon: buildwidget(
icon: 'united-kingdom.png'
),
),
reaction(
previewicon: buildwidgetpreview(
title: 'arabic',
icon: 'algeria-round.png',
),
icon: buildwidget(
icon: 'algeria.png'
),
),
reaction(
previewicon: buildwidgetpreview(
title: 'german',
icon: 'germany-round.png',
),
icon: buildwidget(
icon: 'germany.png'
),
),
reaction(
previewicon: buildwidgetpreview(
title: 'spanish',
icon: 'spain-round.png',
),
icon: buildwidget(
icon: 'spain.png'
),
),
reaction(
previewicon: buildwidgetpreview(
title: 'chinese',
icon: 'china-round.png',
),
icon: buildwidget(
icon: 'china.png'
),
),
],
initialreaction: reaction(
previewicon: buildwidgetpreview(
title: 'english',
icon: 'united-kingdom-round.png',
),
icon: buildwidget(
icon: 'united-kingdom.png'
),
),
radius: 10,
elevation: 10,
position: position.top,
color: colors.black.withopacity(0.5),
duration: duration(milliseconds: 500),
)
this is a example flutter reaction button check ( you can also customize everything ):
flutterreactionbuttoncheck(
onreactionchanged: (ischecked, reaction) {
print('reaction changed $ischecked');
},
reaction: <reaction>[
reaction(
previewicon: buildwidgetpreview(
icon: 'like.gif',
),
icon: buildwidget(
icon: 'like_fill.png'
),
),
reaction(
previewicon: buildwidgetpreview(
icon: 'love.gif',
),
icon: buildwidget(
icon: 'love.png'
),
),
reaction(
previewicon: buildwidgetpreview(
icon: 'wow.gif',
),
icon: buildwidget(
icon: 'wow.png'
),
),
reaction(
previewicon: buildwidgetpreview(
icon: 'haha.gif',
),
icon: buildwidget(
icon: 'haha.png'
),
),
reaction(
previewicon: buildwidgetpreview(
icon: 'sad.gif',
),
icon: buildwidget(
icon: 'sad.png'
),
),
reaction(
previewicon: buildwidgetpreview(
icon: 'angry.gif',
),
icon: buildwidget(
icon: 'angry.png'
),
),
],
initialreaction: reaction(
icon: buildwidget(
icon: 'like.png'
),
),
selectedreaction: reaction(
icon: buildwidget(
icon: 'like_fill.png'
),
),
)
Comments are closed.