getAccessType function
Implementation
AccessType? getAccessType(String source) {
if (source.endsWith('toFuture()')) return AccessType.toFuture;
if (source.endsWith('value')) return AccessType.value;
if (source.endsWith('call()')) return AccessType.call;
if (source.endsWith('call')) return AccessType.callTearOff;
if (source.endsWith('toFuture')) return AccessType.toFutureTearOff;
if (source.endsWith('()')) return AccessType.call;
return null;
}