ScheduleModel class
The ScheduleModel class represents a model for a schedule.
This model contains information about a specific schedule, including ID, date, leave status, start time, end time, and name.
This class extends the Equatable class to enable easy comparison and equality checks.
Constructors
- ScheduleModel({required int id, required DateTime date, int? isLeave, String? timeStart, String? timeEnd, String? name})
-
Creates a new instance of the ScheduleModel class.
const
-
ScheduleModel.fromJson(Map<
String, dynamic> json) -
Creates a new instance of the ScheduleModel class from a JSON map.
factory
Properties
- date → DateTime
-
The date of the schedule.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- id → int
-
The unique identifier of the schedule.
final
- isLeave → int?
-
Indicates whether the schedule is for leave.
final
- name → String?
-
The name of the schedule.
final
-
props
→ List<
Object?> -
The list of properties that will be used to determine whether
two instances are equal.
no setter
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- stringify → bool?
-
If set to
true
, thetoString
method will be overridden to output this instance'sprops
.no setterinherited - timeEnd → String?
-
The end time of the schedule.
final
- timeStart → String?
-
The start time of the schedule.
final
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toJson(
) → Map< String, dynamic> - Converts the ScheduleModel instance to a JSON map.
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited