detectMixinTypeName method

Iterable<String> detectMixinTypeName(
  1. TypeInfo typeInfo
)

Implementation

Iterable<String> detectMixinTypeName(TypeInfo typeInfo) {
  final mixinPattern = RegExp(r'Type(..(.+) with .(.+))');
  return mixinPattern.hasMatch(typeInfo.typeName!)
      ? mixinPattern.allMatches(typeInfo.typeName!).first.groups([2, 3]).map(
          (e) => e!.replaceAll('.', '').replaceAll(')', ''))
      : [];
}