item method

T? item(
  1. int index
)

获取指定元素

Implementation

T? item(int index) {
  if (isNullOrEmpty) return null;
  if (index < 0 || index >= this!.length) return null;
  return this![index];
}