Answer the question
In order to leave comments, you need to log in
Answer the question
In order to leave comments, you need to log in
You write a class.
It has a lot of internal logic, mb parsers.
It can contain streams, etc.
Normal reference to an instance is like a class.
But if you need to call it as a function, this is where it comes in handy.
A very contrived example:
class Counter {
int _count = 0;
call() => _count++;
}
var counter = Counter();
Button(onTap: counter)
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question