t×tecexpressby TeKOcloud
DEv0.7.1
Data & views / FLUTTER

TxScheduler.

Interactive preview

Day, week and month calendar with appointment editing. All-day end dates are exclusive; recurrence, resources and drag-and-drop are unavailable.

TxScheduler

ParameterTypeDefaultMeaning
dataSourceObject?nullList, configuration or DataSource instance; takes precedence over items.
onDataSourceChangedValueChanged<List<TxAppointment>>?nullReports dataSource; update controlled state in the callback.
currentDateDateTime?nullCurrent calendar date; update a controlled value for navigation.
onCurrentDateChangedValueChanged<DateTime>?nullReports currentDate; update controlled state in the callback.
currentViewTxSchedulerView?nullCurrent calendar view.
onCurrentViewChangedValueChanged<TxSchedulerView>?nullReports currentView; update controlled state in the callback.
viewsList<TxSchedulerView>const [TxSchedulerView.day, TxSchedulerView.week, TxSchedulerView.month]Available calendar views.
firstDayOfWeekint1First weekday; 1 = Monday.
startDayHourint8First visible hour of the day.
endDayHourint18Last visible hour of the day.
cellDurationint30Calendar cell duration in minutes.
editingTxSchedulerEditingconst TxSchedulerEditing()Permissions to create, update and delete.
readOnlyboolfalsePrevents value changes.
disabledboolfalseDisables interaction.
loadingboolfalseShows the loading state.
localeString'de'Locale for date/time formatting.
labelString'Terminplaner'Label or accessible name.
appointmentBuilderWidget Function(BuildContext context, TxAppointment item, TxSchedulerView view)?nullBuilds custom content; callback arguments and return type are given in the signature.
onAppointmentClickValueChanged<TxAppointment>?nullReports the activated TxAppointment.
onCellClickvoid Function(DateTime start, DateTime end, bool allDay)?nullReports cell start, cell end and the all-day flag as three arguments.
onAppointmentAddingValueChanged<TxChange<TxAppointment>>?nullBefore insertion: TxChange<TxAppointment>; set cancel synchronously to abort.
onAppointmentUpdatingValueChanged<TxChange<TxAppointmentUpdate>>?nullBefore updating: TxChange<TxAppointmentUpdate> with old and new appointments; synchronously cancellable.
onAppointmentDeletingValueChanged<TxChange<TxAppointment>>?nullBefore deletion: TxChange<TxAppointment>; set cancel synchronously to abort.
onAppointmentAddedValueChanged<TxAppointment>?nullReports the locally inserted TxAppointment.
onAppointmentUpdatedValueChanged<TxAppointmentUpdate>?nullReports TxAppointmentUpdate containing old and new appointments.
onAppointmentDeletedValueChanged<TxAppointment>?nullReports the locally deleted TxAppointment.
dart
import 'package:flutter/material.dart';
import 'package:tecexpress/tecexpress.dart';

Widget example() {
  var appointments = [TxAppointment(id: 1, text: 'Meeting', startDate: DateTime(2026, 10, 28, 9), endDate: DateTime(2026, 10, 28, 10))];
  return StatefulBuilder(
    builder: (context, setState) => TxScheduler(dataSource: appointments, onDataSourceChanged: (v) => setState(() => appointments = v)),
  );
}