mirror of
https://github.com/SyncrowIOT/web.git
synced 2025-11-27 05:34:56 +00:00
@ -21,12 +21,9 @@ class PeriodOptions extends StatelessWidget {
|
||||
builder: (context, state) {
|
||||
return Column(
|
||||
children: [
|
||||
_buildRadioOption(
|
||||
context, EnumEffectivePeriodOptions.allDay, '24 Hours'),
|
||||
_buildRadioOption(context, EnumEffectivePeriodOptions.daytime,
|
||||
'Sunrise to Sunset'),
|
||||
_buildRadioOption(
|
||||
context, EnumEffectivePeriodOptions.night, 'Sunset to Sunrise'),
|
||||
_buildRadioOption(context, EnumEffectivePeriodOptions.allDay, '24 Hours'),
|
||||
_buildRadioOption(context, EnumEffectivePeriodOptions.daytime, 'Sunrise to Sunset'),
|
||||
_buildRadioOption(context, EnumEffectivePeriodOptions.night, 'Sunset to Sunrise'),
|
||||
ListTile(
|
||||
contentPadding: EdgeInsets.zero,
|
||||
onTap: () => showCustomTimePicker(context),
|
||||
@ -37,8 +34,7 @@ class PeriodOptions extends StatelessWidget {
|
||||
fontWeight: FontWeight.w400,
|
||||
fontSize: 14),
|
||||
),
|
||||
subtitle: state.customStartTime != null &&
|
||||
state.customEndTime != null
|
||||
subtitle: state.customStartTime != null && state.customEndTime != null
|
||||
? Text(
|
||||
'${"${state.customStartTime}"} - ${"${state.customEndTime}"}',
|
||||
style: Theme.of(context).textTheme.bodyMedium!.copyWith(
|
||||
@ -82,16 +78,12 @@ class PeriodOptions extends StatelessWidget {
|
||||
title: Text(
|
||||
EffectPeriodHelper.formatEnumValue(value),
|
||||
style: Theme.of(context).textTheme.bodyMedium!.copyWith(
|
||||
color: ColorsManager.blackColor,
|
||||
fontWeight: FontWeight.w400,
|
||||
fontSize: 12),
|
||||
color: ColorsManager.blackColor, fontWeight: FontWeight.w400, fontSize: 12),
|
||||
),
|
||||
subtitle: Text(
|
||||
subtitle,
|
||||
style: Theme.of(context).textTheme.bodyMedium!.copyWith(
|
||||
color: ColorsManager.textPrimaryColor,
|
||||
fontWeight: FontWeight.w400,
|
||||
fontSize: 10),
|
||||
color: ColorsManager.textPrimaryColor, fontWeight: FontWeight.w400, fontSize: 10),
|
||||
),
|
||||
trailing: Radio<EnumEffectivePeriodOptions>(
|
||||
value: value,
|
||||
|
||||
Reference in New Issue
Block a user