Skip to content

Commit

Permalink
_DateAndTimeTile add required
Browse files Browse the repository at this point in the history
  • Loading branch information
Jonas-Sander committed Feb 22, 2024
1 parent 2df73a7 commit 4d265ac
Showing 1 changed file with 7 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -450,18 +450,18 @@ class _DateAndTimeTile extends StatelessWidget {
const _DateAndTimeTile({
super.key,
this.leading,
this.date,
this.time,
required this.date,
required this.time,
this.timeFieldKey,
this.isDatePickingEnabled = true,
required this.onTimeChanged,
this.showEndNotAfterBeginningError = false,
});

final Widget? leading;
final Date? date;
final Time? time;
final Date date;
final Time time;
final void Function(Time newTime) onTimeChanged;
final Widget? leading;
final Key? timeFieldKey;
final bool showEndNotAfterBeginningError;
final bool isDatePickingEnabled;
Expand All @@ -477,7 +477,7 @@ class _DateAndTimeTile extends StatelessWidget {
)
: null,
title: Text(
date?.parser.toYMMMEd ?? 'Datum auswählen...',
date.parser.toYMMMEd,
style: TextStyle(
color: isDatePickingEnabled
? Theme.of(context).textTheme.bodyMedium!.color
Expand Down Expand Up @@ -506,7 +506,7 @@ class _DateAndTimeTile extends StatelessWidget {
onTimeChanged(Time(hour: picked.hour, minute: picked.minute));
}
},
child: Text(time?.toString() ?? ''),
child: Text(time.toString()),
),
onTap: isDatePickingEnabled
? () async {
Expand Down

0 comments on commit 4d265ac

Please sign in to comment.