getAuthInfo method

List<Map<String, dynamic>> getAuthInfo(
  1. RouteBase route,
  2. String type
)

Implementation

List<Map<String, dynamic>> getAuthInfo(RouteBase route, String type) {
    if (route.metadataMap.containsKey("auth")) {
        final auth = route.metadataMap["auth"];
        List<Map<String, dynamic>> results = [];
        for (var info in auth) {
            if(info["type"] == type) {
                results.add(info);
            }
        }
        return results;
    }
    return [];
}