Now consider the below code where inside the onpress event of the elevated button we try to call two different methods.
Here in order to group these two individual methods in a single line we can wrap them using the square bracket [] as shown below to convert them as a single list of method. This will help increase the code quality without affecting the logic.
Well that’s it. Run the code to see it in action.
Like it
38