1
0
mirror of https://gitlab.com/comunic/comunicmobile synced 2024-12-26 04:48:51 +00:00
comunicmobile/lib/lists/friends_list.dart

25 lines
557 B
Dart

import 'dart:collection';
import 'package:comunic/models/friend.dart';
/// List of friends of the user
///
/// @author Pierre HUBERT
class FriendsList extends ListBase<Friend> {
List<Friend> _list = List();
int get length => _list.length;
set length(int length) => _list.length = length;
@override
Friend operator [](int index) => _list[index];
@override
void operator []=(int index, Friend value) => _list[index] = value;
/// Get the ID of all the friends of the current user
List<int> get usersId => map((f) => f.id).toList();
}