average method

Future<double> average (num selector(T object))

Computes the average of some ManagedObject property.

selector identifies the property being averaged, e.g.

    var query = Query<User>();
    var averageAge = await query.reduce.average((user) => user.age);

The property must be an attribute and its type must be an num, i.e. int or double.


Future<double> average(num selector(T object));