mirror of
https://github.com/Iconica-Development/flutter_availability.git
synced 2025-05-19 13:13:44 +02:00
fix: always display selected days and do not overwrite first template
This commit is contained in:
parent
fd2bef92ac
commit
370f431784
1 changed files with 34 additions and 37 deletions
|
@ -91,45 +91,42 @@ class _TemplateLegendState extends State<TemplateLegend> {
|
||||||
thickness: 2,
|
thickness: 2,
|
||||||
child: Column(
|
child: Column(
|
||||||
children: [
|
children: [
|
||||||
for (final (index, template) in templates.indexed) ...[
|
Padding(
|
||||||
if (index == 0) ...[
|
padding: const EdgeInsets.only(
|
||||||
Padding(
|
top: 10,
|
||||||
padding: const EdgeInsets.only(
|
left: 12,
|
||||||
top: 10,
|
),
|
||||||
left: 12,
|
child: _TemplateLegendItem(
|
||||||
),
|
name: translations.templateSelectionLabel,
|
||||||
child: _TemplateLegendItem(
|
backgroundColor:
|
||||||
name: translations.templateSelectionLabel,
|
colors.selectedDayColor ?? colorScheme.primaryFixedDim,
|
||||||
backgroundColor: colors.selectedDayColor ??
|
borderColor: colorScheme.primary,
|
||||||
colorScheme.primaryFixedDim,
|
),
|
||||||
borderColor: colorScheme.primary,
|
),
|
||||||
),
|
if (existAvailabilitiesWithoutTemplate) ...[
|
||||||
|
Padding(
|
||||||
|
padding: const EdgeInsets.only(
|
||||||
|
top: 10,
|
||||||
|
left: 12,
|
||||||
),
|
),
|
||||||
if (existAvailabilitiesWithoutTemplate) ...[
|
child: _TemplateLegendItem(
|
||||||
Padding(
|
name: translations.availabilityWithoutTemplateLabel,
|
||||||
padding: const EdgeInsets.only(
|
backgroundColor: colors.customAvailabilityColor ??
|
||||||
top: 10,
|
colorScheme.secondary,
|
||||||
left: 12,
|
|
||||||
),
|
|
||||||
child: _TemplateLegendItem(
|
|
||||||
name: translations.availabilityWithoutTemplateLabel,
|
|
||||||
backgroundColor: colors.customAvailabilityColor ??
|
|
||||||
colorScheme.secondary,
|
|
||||||
),
|
|
||||||
),
|
|
||||||
],
|
|
||||||
] else ...[
|
|
||||||
Padding(
|
|
||||||
padding: const EdgeInsets.only(
|
|
||||||
top: 10,
|
|
||||||
left: 12,
|
|
||||||
),
|
|
||||||
child: _TemplateLegendItem(
|
|
||||||
name: template.name,
|
|
||||||
backgroundColor: Color(template.color),
|
|
||||||
),
|
|
||||||
),
|
),
|
||||||
],
|
),
|
||||||
|
],
|
||||||
|
for (var template in templates) ...[
|
||||||
|
Padding(
|
||||||
|
padding: const EdgeInsets.only(
|
||||||
|
top: 10,
|
||||||
|
left: 12,
|
||||||
|
),
|
||||||
|
child: _TemplateLegendItem(
|
||||||
|
name: template.name,
|
||||||
|
backgroundColor: Color(template.color),
|
||||||
|
),
|
||||||
|
),
|
||||||
],
|
],
|
||||||
Padding(
|
Padding(
|
||||||
padding: const EdgeInsets.only(
|
padding: const EdgeInsets.only(
|
||||||
|
|
Loading…
Reference in a new issue