mirror of
https://gitlab.com/comunic/comunicmobile
synced 2025-06-19 00:05:16 +00:00
Display Forez presence
This commit is contained in:
29
lib/models/forez_presence.dart
Normal file
29
lib/models/forez_presence.dart
Normal file
@ -0,0 +1,29 @@
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
/// Single presence information
|
||||
///
|
||||
/// @author Pierre Hubert
|
||||
|
||||
class Presence {
|
||||
final int userID;
|
||||
final int year;
|
||||
final int month;
|
||||
final int day;
|
||||
|
||||
const Presence({
|
||||
@required this.userID,
|
||||
@required this.year,
|
||||
@required this.month,
|
||||
@required this.day,
|
||||
}) : assert(userID != null),
|
||||
assert(year != null),
|
||||
assert(month != null),
|
||||
assert(day != null);
|
||||
|
||||
Presence.fromDateTime(DateTime dt, this.userID)
|
||||
: assert(dt != null),
|
||||
year = dt.year,
|
||||
month = dt.month,
|
||||
day = dt.day,
|
||||
assert(userID != null);
|
||||
}
|
Reference in New Issue
Block a user