From 8ddd75707fb8deb4589d604cd9dc4e4ad4c754f5 Mon Sep 17 00:00:00 2001 From: Deven Joshi Date: Mon, 18 Jan 2021 16:12:20 +0530 Subject: [PATCH] fix: removed bad state --- lib/src/reaction_picker.dart | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/src/reaction_picker.dart b/lib/src/reaction_picker.dart index 94bd9162..8e2d8b10 100644 --- a/lib/src/reaction_picker.dart +++ b/lib/src/reaction_picker.dart @@ -40,7 +40,8 @@ class ReactionPicker extends StatelessWidget { final totalScore = message.latestReactions .where((r) => r.type == reactionType) .map((r) => r.score) - .reduce((tot, s) => tot + s); + .fold(0, (tot, s) => tot + s); + return Column( mainAxisSize: MainAxisSize.min, mainAxisAlignment: MainAxisAlignment.start,