getTypeParams method Null safety

Iterable<String> getTypeParams(
  1. TypeInfo typeInfo
)

Implementation

Iterable<String> getTypeParams(TypeInfo typeInfo) =>
    typeInfo.typeName!.indexOf('<') > 0
        ? RegExp('<(.+)>')
            .allMatches(typeInfo.typeName!)
            .first
            .group(1)!
            .split(',')
            .map((x) => x.trim())
            .toList()
        : [];