Immutable appointment with a validated key, title and end after start. All-day bounds must be local midnight.
TxAppointment
| Parameter | Type | Default | Meaning |
|---|---|---|---|
| id | Object | required | Unique stable ID. |
| text | String | required | Text to display. |
| startDate | DateTime | required | Appointment/cell start. |
| endDate | DateTime | required | Appointment/cell end; exclusive for all-day entries. |
| allDay | bool | false | All-day appointment with local day boundaries. |
| description | String | '' | Optional appointment description. |
| Member / type / return | Meaning |
|---|---|
TxAppointment copyWith({String? text, DateTime? startDate, DateTime? endDate, bool? allDay, String? description}) | Creates a copy with the supplied changes; preserves other values. |
import 'package:tecexpress/tecexpress.dart';
Future<void> example() async {
final meeting = TxAppointment(id: 1, text: 'Meeting', startDate: DateTime(2026, 10, 28, 9), endDate: DateTime(2026, 10, 28, 10));
print(meeting.copyWith(text: 'Updated').text);
}