updated project style guidelines
This commit is contained in:
@ -33,7 +33,7 @@ class AppointmentDetails {
|
||||
}
|
||||
|
||||
static void show(BuildContext context, TimetableProps webuntisData, Appointment appointment) {
|
||||
(appointment.id as ArbitraryAppointment).handlers(
|
||||
(appointment.id! as ArbitraryAppointment).handlers(
|
||||
(webuntis) => _webuntis(context, webuntisData, appointment, webuntis),
|
||||
(customData) => _custom(context, webuntisData, customData)
|
||||
);
|
||||
@ -76,21 +76,18 @@ class AppointmentDetails {
|
||||
|
||||
_bottomSheet(
|
||||
context,
|
||||
(context) {
|
||||
return Center(
|
||||
(context) => Center(
|
||||
child: Column(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
children: [
|
||||
Text("${_getEventPrefix(timetableData.code)}${subject.alternateName}", textAlign: TextAlign.center, style: const TextStyle(fontSize: 25), overflow: TextOverflow.ellipsis),
|
||||
Text('${_getEventPrefix(timetableData.code)}${subject.alternateName}', textAlign: TextAlign.center, style: const TextStyle(fontSize: 25), overflow: TextOverflow.ellipsis),
|
||||
Text(subject.longName),
|
||||
Text("${Jiffy.parseFromDateTime(appointment.startTime).format(pattern: "HH:mm")} - ${Jiffy.parseFromDateTime(appointment.endTime).format(pattern: "HH:mm")}", style: const TextStyle(fontSize: 15)),
|
||||
],
|
||||
),
|
||||
);
|
||||
},
|
||||
),
|
||||
|
||||
(context) {
|
||||
return SliverChildListDelegate(
|
||||
(context) => SliverChildListDelegate(
|
||||
[
|
||||
const Divider(),
|
||||
ListTile(
|
||||
@ -132,13 +129,12 @@ class AppointmentDetails {
|
||||
),
|
||||
DebugTile(context).jsonData(timetableData.toJson()),
|
||||
],
|
||||
);
|
||||
}
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
static Completer deleteCustomEvent(BuildContext context, CustomTimetableEvent appointment) {
|
||||
Completer future = Completer();
|
||||
var future = Completer();
|
||||
ConfirmDialog(
|
||||
title: 'Termin löschen',
|
||||
content: "Der ${appointment.rrule.isEmpty ? "Termin" : "Serientermin"} wird unwiederruflich gelöscht.",
|
||||
@ -160,8 +156,7 @@ class AppointmentDetails {
|
||||
static void _custom(BuildContext context, TimetableProps webuntisData, CustomTimetableEvent appointment) {
|
||||
_bottomSheet(
|
||||
context,
|
||||
(context) {
|
||||
return Center(
|
||||
(context) => Center(
|
||||
child: Column(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
children: [
|
||||
@ -169,10 +164,8 @@ class AppointmentDetails {
|
||||
Text("${Jiffy.parseFromDateTime(appointment.startDate).format(pattern: "HH:mm")} - ${Jiffy.parseFromDateTime(appointment.endDate).format(pattern: "HH:mm")}", style: const TextStyle(fontSize: 15)),
|
||||
],
|
||||
),
|
||||
);
|
||||
},
|
||||
(context) {
|
||||
return SliverChildListDelegate(
|
||||
),
|
||||
(context) => SliverChildListDelegate(
|
||||
[
|
||||
const Divider(),
|
||||
Center(
|
||||
@ -212,7 +205,7 @@ class AppointmentDetails {
|
||||
builder: (context, snapshot) {
|
||||
if(appointment.rrule.isEmpty) return const Text('Keine weiteren vorkomnisse');
|
||||
if(snapshot.data == null) return const Text('...');
|
||||
RecurrenceRule rrule = RecurrenceRule.fromString(appointment.rrule);
|
||||
var rrule = RecurrenceRule.fromString(appointment.rrule);
|
||||
if(!rrule.canFullyConvertToText) return const Text('Keine genauere Angabe möglich.');
|
||||
return Text(rrule.toText(l10n: snapshot.data!));
|
||||
},
|
||||
@ -227,8 +220,7 @@ class AppointmentDetails {
|
||||
),
|
||||
DebugTile(context).jsonData(appointment.toJson()),
|
||||
]
|
||||
);
|
||||
}
|
||||
)
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user