getResultMatch function
Match the typeString with the regex
Example: 'Result<u8, bool>' -> 'Result<u8, bool>', 'Result', 'u8', 'bool'
Example: 'Result<Result<u8, bool>, bool>' -> 'Result<Result<u8, bool>, bool>', 'Result', 'Result<u8, bool>', 'bool'
Implementation
RegExpMatch? getResultMatch(String typeString) {
return RegExp(r'^([^<]*)<(.+),(.+)>$').firstMatch(typeString);
}