Problem description

Flutter uses compute to report exceptions using the following code

 await compute(fibonacci, 40)
Copy the code

abnormal

Illegal argument in isolate message : (object is a closure - Function 'XXXX':.)
Copy the code

Abnormal reason

The first parameter to compute must be a top-level method, not an internal method of the class, nor a static method