Unlike in JavaScript, you can't simply check for a truthy value of an array. The code if (arr) will throw an error, because arr doesn't evaluate to a bool value.
I'm not entirely sure what you're trying to achieve here, but some thoughts regarding efficient Dart / Flutter:
To merge two arrays, you can simple add the arrays.
final array1 = [1, 2, 3];
final array2 = [4, 5, 6];
final joinedArray = array1 + array2;
print(joinedArray); // [1, 2, 3, 4, 5, 6];
Instead of checking for length == 0, use isEmpty.
if (arr1.isEmpty)
The reversing of an array can be done using the inbuilt .reversed method.
final reversedArray = array1.reversed;