1
0
mirror of https://gitlab.com/comunic/comunicmobile synced 2025-06-19 00:05:16 +00:00

Display the list of friends of the user

This commit is contained in:
2019-05-01 17:52:41 +02:00
parent 3109f7c482
commit 5021ded039
9 changed files with 343 additions and 2 deletions

View File

@ -0,0 +1,24 @@
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();
}