getRegistrations method

Future<List<ServiceWorkerRegistration>> getRegistrations()

Returns all ServiceWorkerRegistrations associated with a ServiceWorkerContainer in an array. If the method can't return ServiceWorkerRegistrations, it returns a Promise.

Implementation

Future<List<ServiceWorkerRegistration>> getRegistrations() =>
    promiseToFuture<List, List<ServiceWorkerRegistration>>(
        _callMethod(_delegate, 'getRegistrations', []),
        (List list) => list
            .map<ServiceWorkerRegistration>(
                (j) => ServiceWorkerRegistration._(j as Object))
            .toList());