mirror of
https://gitlab.com/comunic/comunicmobile
synced 2024-11-22 21:09:21 +00:00
28 lines
682 B
Dart
28 lines
682 B
Dart
|
import 'package:meta/meta.dart';
|
||
|
|
||
|
/// Simple friendship status
|
||
|
///
|
||
|
/// @author Pierre HUBERT
|
||
|
|
||
|
class FriendStatus {
|
||
|
final int userID;
|
||
|
final bool areFriend;
|
||
|
final bool sentRequest;
|
||
|
final bool receivedRequest;
|
||
|
final bool following;
|
||
|
|
||
|
const FriendStatus({
|
||
|
@required this.userID,
|
||
|
@required this.areFriend,
|
||
|
@required this.sentRequest,
|
||
|
@required this.receivedRequest,
|
||
|
@required this.following,
|
||
|
}) : assert(userID != null),
|
||
|
assert(areFriend != null),
|
||
|
assert(sentRequest != null),
|
||
|
assert(receivedRequest != null),
|
||
|
assert(following != null);
|
||
|
|
||
|
bool get noRequestExchanged => !areFriend && !sentRequest && !receivedRequest;
|
||
|
}
|