please what's the difference between a method called with a parameter and one called with no parameter example:
state is! LoginInProgress ? _onLoginButtonPressed : null,
and:
state is! LoginInProgress ? _onLoginButtonPressed(): null,
these two statements have different functionalities in my code execution, _onLoginButtonPressed and _onLoginButtonPressed() i mean, please I would really apricate if I can get the difference between the two, thanks in advance.
When a method has a parameter and it requires a variable to perform the method thus its just like when your mom asks you to go out for shopping but you have arguments that you need money and a hello kitty bag to perform that task. For example : Let's say a method called a go_for_shopping requires two variables to perform its task, if we don't provide the integers it will give you an error.
void go_for_shopping(string hello_kitty_bag, int money){ return hello_kitty_bag + money;}But when you set no parameters it will perform the task without any arguments when you call that method.