getUsers function

Future<Iterable<User>> getUsers ()

This function returns an iterator of User objects.

Implementation

Future<Iterable<User>> getUsers() async {
  var users = await fetchUserList( _fetchUsersURL );

  // return Iterable object
  return users.map( ( user ) {
    return User(
      user[ 'id' ],
      user[ 'first_name' ],
      user[ 'last_name' ]
    );
  } );
}