'Missing type arguments for generic type 'Future<dynamic>'. Try adding an explicit type, or remove implicit-dynamic from your analysis options file
How do I resolve this issue without removing the implicit-dynamic form analysis options file?
Error:
My Code:
Future<void> _scrollToBottomOnKeyboardOpen() async {
while (!isKeyboardVisible) {
await Future.delayed(const Duration(milliseconds: 50));
}
await Future.delayed(const Duration(milliseconds: 250));
await scrollController.animateTo(
scrollController.position.maxScrollExtent,
duration: const Duration(milliseconds: 250),
curve: Curves.easeIn,
);
}
Solution 1:[1]
Add the specific type void
and thus make it not generic:
Future<void>.delayed(...)
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|---|
Solution 1 | Dabbel |