button function

Widget button(
  1. Reaction reaction,
  2. dynamic func()
)

Implementation

Widget button(Reaction reaction, Function() func) {
  return IconTheme(
    data: IconThemeData(color: color(reaction)),
    child: Row(
      children: [
        IconButton(
          tooltip: reaction.tooltip,
          icon: reaction.uri != null ? reaction.on : reaction.off,
          onPressed: func,
        )
      ],
    ),
  );
}