From 7a03a40d402401d85b25f1ba994b6dd7e7121a0e Mon Sep 17 00:00:00 2001 From: Abitofevrything <54505189+abitofevrything@users.noreply.github.com> Date: Mon, 2 Oct 2023 00:43:11 -0700 Subject: [PATCH] Correct FallbackConverter toButton and toSelectMenuOption methods (#138) --- lib/src/converters/fallback.dart | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/src/converters/fallback.dart b/lib/src/converters/fallback.dart index d41c3ee..f44edda 100644 --- a/lib/src/converters/fallback.dart +++ b/lib/src/converters/fallback.dart @@ -131,7 +131,7 @@ class FallbackConverter implements Converter { } for (final converter in converters) { - if (converter.toSelectMenuOption != null) { + if (converter.toSelectMenuOption is FutureOr Function(T)) { return converter.toSelectMenuOption; } } @@ -146,7 +146,7 @@ class FallbackConverter implements Converter { } for (final converter in converters) { - if (converter.toButton != null) { + if (converter.toButton is FutureOr Function(T)) { return converter.toButton; } }