getSortedScopes method

List getSortedScopes(
  1. List<String> scopes
)

Implementation

List getSortedScopes(List<String> scopes) {
  var sortedScopes = [];

  var cleanScopes = clearScopes(scopes);

  if (cleanScopes.isNotEmpty) {
    sortedScopes = cleanScopes.toList()
      ..sort((a, b) => a.toLowerCase().compareTo(b.toLowerCase()));
  }

  return sortedScopes;
}