-
Notifications
You must be signed in to change notification settings - Fork 90
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
c99f888
commit a2147c3
Showing
5 changed files
with
38 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,7 @@ | ||
## 2.0.4 | ||
|
||
- Add Room type | ||
|
||
## 2.0.3 | ||
|
||
- Fix null status | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
import 'package:meta/meta.dart'; | ||
import 'user.dart'; | ||
|
||
/// A class that represents a room where 2 or more participants can chat | ||
@immutable | ||
class Room { | ||
/// Creates a [Room] | ||
const Room({ | ||
required this.id, | ||
this.imageUrl, | ||
required this.isGroup, | ||
this.name, | ||
required this.users, | ||
}); | ||
|
||
/// Room's unique ID | ||
final String id; | ||
|
||
/// Room's image. In case the room has 2 users - avatar of the second person, | ||
/// otherwise custom image (for a group). | ||
final String? imageUrl; | ||
|
||
/// Should be true if more than 2 users are in the room | ||
final bool isGroup; | ||
|
||
/// Room's name. In case the room has 2 users - name of the second person, | ||
/// otherwise custom name (for a group). | ||
final String? name; | ||
|
||
/// List of users which are in the room | ||
final List<User> users; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters