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,8 +91,6 @@ class _TemplateLegendState extends State<TemplateLegend> {
|
||||||
thickness: 2,
|
thickness: 2,
|
||||||
child: Column(
|
child: Column(
|
||||||
children: [
|
children: [
|
||||||
for (final (index, template) in templates.indexed) ...[
|
|
||||||
if (index == 0) ...[
|
|
||||||
Padding(
|
Padding(
|
||||||
padding: const EdgeInsets.only(
|
padding: const EdgeInsets.only(
|
||||||
top: 10,
|
top: 10,
|
||||||
|
@ -100,8 +98,8 @@ class _TemplateLegendState extends State<TemplateLegend> {
|
||||||
),
|
),
|
||||||
child: _TemplateLegendItem(
|
child: _TemplateLegendItem(
|
||||||
name: translations.templateSelectionLabel,
|
name: translations.templateSelectionLabel,
|
||||||
backgroundColor: colors.selectedDayColor ??
|
backgroundColor:
|
||||||
colorScheme.primaryFixedDim,
|
colors.selectedDayColor ?? colorScheme.primaryFixedDim,
|
||||||
borderColor: colorScheme.primary,
|
borderColor: colorScheme.primary,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
@ -118,7 +116,7 @@ class _TemplateLegendState extends State<TemplateLegend> {
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
] else ...[
|
for (var template in templates) ...[
|
||||||
Padding(
|
Padding(
|
||||||
padding: const EdgeInsets.only(
|
padding: const EdgeInsets.only(
|
||||||
top: 10,
|
top: 10,
|
||||||
|
@ -130,7 +128,6 @@ class _TemplateLegendState extends State<TemplateLegend> {
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
],
|
|
||||||
Padding(
|
Padding(
|
||||||
padding: const EdgeInsets.only(
|
padding: const EdgeInsets.only(
|
||||||
top: 10,
|
top: 10,
|
||||||
|
|
Loading…
Reference in a new issue