When changing the state in a Flutter Widget, are there any differences between doing this
_variable1 = true;
variable2 = 'abc';
setState(() => {});
or this
setState(() => {
_variable1 = true;
variable2 = 'abc';
});
Almost all the examples in the docs use the last one, but I didn't notice any pratical differences. The variables are set and the state is updated in both cases, but I am wondering if there is a scenario that something doesn't work as expected if use one or another.