invalid_
                  Inline function types can't be used for parameters in a generic function type.
Description
#The analyzer produces this diagnostic when a generic function type has a function-valued parameter that is written using the older inline function type syntax.
Example
#
                    The following code produces this diagnostic because the parameter f, in
                    the generic function type used to define F, uses the inline function
                    type syntax:
                  
typedef F = int Function(int f(String s));
Common fixes
#Use the generic function syntax for the parameter's type:
typedef F = int Function(int Function(String));
Unless stated otherwise, the documentation on this site reflects Dart 3.9.2. Page last updated on 2025-9-1. View source or report an issue.