mirror of
https://github.com/SyncrowIOT/web.git
synced 2025-07-10 07:07:19 +00:00
Enhance scheduling UI in glass switch control views with improved layout and dialog integration
This commit is contained in:
@ -106,14 +106,123 @@ class ThreeGangGlassSwitchControlView extends StatelessWidget
|
||||
);
|
||||
},
|
||||
),
|
||||
ToggleWidget(
|
||||
value: false,
|
||||
code: '',
|
||||
deviceId: deviceId,
|
||||
label: 'Preferences',
|
||||
icon: Assets.preferences,
|
||||
onChange: (value) {},
|
||||
showToggle: false,
|
||||
GestureDetector(
|
||||
onTap: () {
|
||||
showDialog<void>(
|
||||
context: context,
|
||||
builder: (ctx) => BlocProvider.value(
|
||||
value: BlocProvider.of<ThreeGangGlassSwitchBloc>(context),
|
||||
child: BuildScheduleView(
|
||||
category: 'switch_1',
|
||||
deviceUuid: deviceId,
|
||||
),
|
||||
));
|
||||
},
|
||||
child: DeviceControlsContainer(
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Container(
|
||||
width: 60,
|
||||
height: 60,
|
||||
decoration: const BoxDecoration(
|
||||
shape: BoxShape.circle,
|
||||
color: ColorsManager.whiteColors,
|
||||
),
|
||||
margin: const EdgeInsets.symmetric(horizontal: 4),
|
||||
padding: const EdgeInsets.all(12),
|
||||
child: ClipOval(
|
||||
child: SvgPicture.asset(
|
||||
Assets.scheduling,
|
||||
fit: BoxFit.fill,
|
||||
),
|
||||
),
|
||||
),
|
||||
const Spacer(),
|
||||
Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Text(
|
||||
'Wall Light',
|
||||
textAlign: TextAlign.center,
|
||||
style: context.textTheme.titleMedium!.copyWith(
|
||||
fontWeight: FontWeight.w200,
|
||||
fontSize: 12,
|
||||
color: ColorsManager.blackColor,
|
||||
),
|
||||
),
|
||||
Text(
|
||||
'Scheduling',
|
||||
textAlign: TextAlign.center,
|
||||
style: context.textTheme.titleMedium!.copyWith(
|
||||
fontWeight: FontWeight.w400,
|
||||
color: ColorsManager.blackColor,
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
GestureDetector(
|
||||
onTap: () {
|
||||
showDialog<void>(
|
||||
context: context,
|
||||
builder: (ctx) => BlocProvider.value(
|
||||
value: BlocProvider.of<ThreeGangGlassSwitchBloc>(context),
|
||||
child: BuildScheduleView(
|
||||
category: 'switch_2',
|
||||
deviceUuid: deviceId,
|
||||
),
|
||||
));
|
||||
},
|
||||
child: DeviceControlsContainer(
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Container(
|
||||
width: 60,
|
||||
height: 60,
|
||||
decoration: const BoxDecoration(
|
||||
shape: BoxShape.circle,
|
||||
color: ColorsManager.whiteColors,
|
||||
),
|
||||
margin: const EdgeInsets.symmetric(horizontal: 4),
|
||||
padding: const EdgeInsets.all(12),
|
||||
child: ClipOval(
|
||||
child: SvgPicture.asset(
|
||||
Assets.scheduling,
|
||||
fit: BoxFit.fill,
|
||||
),
|
||||
),
|
||||
),
|
||||
const Spacer(),
|
||||
Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Text(
|
||||
'Ceiling Light',
|
||||
textAlign: TextAlign.center,
|
||||
style: context.textTheme.titleMedium!.copyWith(
|
||||
fontWeight: FontWeight.w200,
|
||||
fontSize: 12,
|
||||
color: ColorsManager.blackColor,
|
||||
),
|
||||
),
|
||||
Text(
|
||||
'Scheduling',
|
||||
textAlign: TextAlign.center,
|
||||
style: context.textTheme.titleMedium!.copyWith(
|
||||
fontWeight: FontWeight.w400,
|
||||
color: ColorsManager.blackColor,
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
GestureDetector(
|
||||
onTap: () {
|
||||
@ -148,18 +257,41 @@ class ThreeGangGlassSwitchControlView extends StatelessWidget
|
||||
),
|
||||
),
|
||||
const Spacer(),
|
||||
Text(
|
||||
'Scheduling',
|
||||
textAlign: TextAlign.center,
|
||||
style: context.textTheme.titleMedium!.copyWith(
|
||||
fontWeight: FontWeight.w400,
|
||||
color: ColorsManager.blackColor,
|
||||
),
|
||||
Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Text(
|
||||
'SpotLight',
|
||||
textAlign: TextAlign.center,
|
||||
style: context.textTheme.titleMedium!.copyWith(
|
||||
fontWeight: FontWeight.w200,
|
||||
fontSize: 12,
|
||||
color: ColorsManager.blackColor,
|
||||
),
|
||||
),
|
||||
Text(
|
||||
'Scheduling',
|
||||
textAlign: TextAlign.center,
|
||||
style: context.textTheme.titleMedium!.copyWith(
|
||||
fontWeight: FontWeight.w400,
|
||||
color: ColorsManager.blackColor,
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
)
|
||||
),
|
||||
ToggleWidget(
|
||||
value: false,
|
||||
code: '',
|
||||
deviceId: deviceId,
|
||||
label: 'Preferences',
|
||||
icon: Assets.preferences,
|
||||
onChange: (value) {},
|
||||
showToggle: false,
|
||||
),
|
||||
],
|
||||
);
|
||||
}
|
||||
|
@ -98,18 +98,9 @@ class TwoGangGlassSwitchControlView extends StatelessWidget
|
||||
onChange: (value) {},
|
||||
showToggle: false,
|
||||
),
|
||||
// ToggleWidget(
|
||||
// value: false,
|
||||
// code: '',
|
||||
// deviceId: deviceId,
|
||||
// label: 'Scheduling',
|
||||
// icon: Assets.scheduling,
|
||||
// onChange: (value) {},
|
||||
// showToggle: false,
|
||||
// ),
|
||||
GestureDetector(
|
||||
onTap: () {
|
||||
showDialog(
|
||||
showDialog<void>(
|
||||
context: context,
|
||||
builder: (ctx) => BlocProvider.value(
|
||||
value: BlocProvider.of<TwoGangGlassSwitchBloc>(context),
|
||||
@ -140,21 +131,35 @@ class TwoGangGlassSwitchControlView extends StatelessWidget
|
||||
),
|
||||
),
|
||||
const Spacer(),
|
||||
Text(
|
||||
'Scheduling',
|
||||
textAlign: TextAlign.center,
|
||||
style: context.textTheme.titleMedium!.copyWith(
|
||||
fontWeight: FontWeight.w400,
|
||||
color: ColorsManager.blackColor,
|
||||
),
|
||||
Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Text(
|
||||
'Wall Light',
|
||||
textAlign: TextAlign.center,
|
||||
style: context.textTheme.titleMedium!.copyWith(
|
||||
fontWeight: FontWeight.w200,
|
||||
fontSize: 12,
|
||||
color: ColorsManager.blackColor,
|
||||
),
|
||||
),
|
||||
Text(
|
||||
'Scheduling',
|
||||
textAlign: TextAlign.center,
|
||||
style: context.textTheme.titleMedium!.copyWith(
|
||||
fontWeight: FontWeight.w400,
|
||||
color: ColorsManager.blackColor,
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
GestureDetector(
|
||||
GestureDetector(
|
||||
onTap: () {
|
||||
showDialog(
|
||||
showDialog<void>(
|
||||
context: context,
|
||||
builder: (ctx) => BlocProvider.value(
|
||||
value: BlocProvider.of<TwoGangGlassSwitchBloc>(context),
|
||||
@ -185,13 +190,27 @@ class TwoGangGlassSwitchControlView extends StatelessWidget
|
||||
),
|
||||
),
|
||||
const Spacer(),
|
||||
Text(
|
||||
'Scheduling',
|
||||
textAlign: TextAlign.center,
|
||||
style: context.textTheme.titleMedium!.copyWith(
|
||||
fontWeight: FontWeight.w400,
|
||||
color: ColorsManager.blackColor,
|
||||
),
|
||||
Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Text(
|
||||
'Ceiling Light',
|
||||
textAlign: TextAlign.center,
|
||||
style: context.textTheme.titleMedium!.copyWith(
|
||||
fontWeight: FontWeight.w200,
|
||||
fontSize: 12,
|
||||
color: ColorsManager.blackColor,
|
||||
),
|
||||
),
|
||||
Text(
|
||||
'Scheduling',
|
||||
textAlign: TextAlign.center,
|
||||
style: context.textTheme.titleMedium!.copyWith(
|
||||
fontWeight: FontWeight.w400,
|
||||
color: ColorsManager.blackColor,
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
],
|
||||
),
|
||||
|
Reference in New Issue
Block a user