Skip to content

Commit

Permalink
fix: fix example
Browse files Browse the repository at this point in the history
  • Loading branch information
GeekAbdelouahed committed Oct 8, 2023
1 parent 985ec14 commit 47655b1
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 8 deletions.
12 changes: 5 additions & 7 deletions example/lib/image.dart
Original file line number Diff line number Diff line change
Expand Up @@ -39,11 +39,11 @@ class _ImageWidgetState extends State<ImageWidget> {
),
),
child: ReactionButton<String>(
onReactionChanged: (Reaction<String>? value) {
onReactionChanged: (Reaction<String>? reaction) {
setState(() {
_selectedReaction = value;
_selectedReaction = reaction;
});
debugPrint('Selected value: $value');
debugPrint('Selected value: ${reaction?.value}');
},
itemSize: const Size.square(40),
reactions: widget.reactions,
Expand Down Expand Up @@ -72,10 +72,8 @@ class _ImageWidgetState extends State<ImageWidget> {
],
),
child: _selectedReaction != null
? widget.reactions
.firstWhere((value) => value.value == _selectedReaction)
.previewIcon
: const SizedBox(),
? _selectedReaction!.previewIcon
: null,
),
),
],
Expand Down
2 changes: 1 addition & 1 deletion example/pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ packages:
path: ".."
relative: true
source: path
version: "2.0.1+1"
version: "2.0.2"
flutter_test:
dependency: "direct dev"
description: flutter
Expand Down

0 comments on commit 47655b1

Please sign in to comment.