toList method

List? toList()

Cast to List if possible

Implementation

List<dynamic>? toList() {
  if (this is List) return this as List<dynamic>;
  return null;
}