Skip to content

Commit

Permalink
Correct FallbackConverter toButton and toSelectMenuOption methods (#138)
Browse files Browse the repository at this point in the history
  • Loading branch information
abitofevrything authored Oct 2, 2023
1 parent 1d598b5 commit 7a03a40
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/src/converters/fallback.dart
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ class FallbackConverter<T> implements Converter<T> {
}

for (final converter in converters) {
if (converter.toSelectMenuOption != null) {
if (converter.toSelectMenuOption is FutureOr<SelectMenuOptionBuilder> Function(T)) {
return converter.toSelectMenuOption;
}
}
Expand All @@ -146,7 +146,7 @@ class FallbackConverter<T> implements Converter<T> {
}

for (final converter in converters) {
if (converter.toButton != null) {
if (converter.toButton is FutureOr<ButtonBuilder> Function(T)) {
return converter.toButton;
}
}
Expand Down

0 comments on commit 7a03a40

Please sign in to comment.