removeFirstElement method
Removes the first element in the list and returns a new list.
Example:
Iterable<int>? numbers = [1, 2, 3];
List<int> result = numbers.removeFirstElement(); // [2, 3]
Implementation
List<T> removeFirstElement() {
List<T> list = [];
if (isNullOrEmpty) return list;
var thisList = this!.toList();
return thisList..removeAt(0);
}