mirror of
https://github.com/SyncrowIOT/web.git
synced 2025-07-10 15:17:31 +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(
|
GestureDetector(
|
||||||
value: false,
|
onTap: () {
|
||||||
code: '',
|
showDialog<void>(
|
||||||
deviceId: deviceId,
|
context: context,
|
||||||
label: 'Preferences',
|
builder: (ctx) => BlocProvider.value(
|
||||||
icon: Assets.preferences,
|
value: BlocProvider.of<ThreeGangGlassSwitchBloc>(context),
|
||||||
onChange: (value) {},
|
child: BuildScheduleView(
|
||||||
showToggle: false,
|
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(
|
GestureDetector(
|
||||||
onTap: () {
|
onTap: () {
|
||||||
@ -148,18 +257,41 @@ class ThreeGangGlassSwitchControlView extends StatelessWidget
|
|||||||
),
|
),
|
||||||
),
|
),
|
||||||
const Spacer(),
|
const Spacer(),
|
||||||
Text(
|
Column(
|
||||||
'Scheduling',
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
textAlign: TextAlign.center,
|
children: [
|
||||||
style: context.textTheme.titleMedium!.copyWith(
|
Text(
|
||||||
fontWeight: FontWeight.w400,
|
'SpotLight',
|
||||||
color: ColorsManager.blackColor,
|
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) {},
|
onChange: (value) {},
|
||||||
showToggle: false,
|
showToggle: false,
|
||||||
),
|
),
|
||||||
// ToggleWidget(
|
|
||||||
// value: false,
|
|
||||||
// code: '',
|
|
||||||
// deviceId: deviceId,
|
|
||||||
// label: 'Scheduling',
|
|
||||||
// icon: Assets.scheduling,
|
|
||||||
// onChange: (value) {},
|
|
||||||
// showToggle: false,
|
|
||||||
// ),
|
|
||||||
GestureDetector(
|
GestureDetector(
|
||||||
onTap: () {
|
onTap: () {
|
||||||
showDialog(
|
showDialog<void>(
|
||||||
context: context,
|
context: context,
|
||||||
builder: (ctx) => BlocProvider.value(
|
builder: (ctx) => BlocProvider.value(
|
||||||
value: BlocProvider.of<TwoGangGlassSwitchBloc>(context),
|
value: BlocProvider.of<TwoGangGlassSwitchBloc>(context),
|
||||||
@ -140,21 +131,35 @@ class TwoGangGlassSwitchControlView extends StatelessWidget
|
|||||||
),
|
),
|
||||||
),
|
),
|
||||||
const Spacer(),
|
const Spacer(),
|
||||||
Text(
|
Column(
|
||||||
'Scheduling',
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
textAlign: TextAlign.center,
|
children: [
|
||||||
style: context.textTheme.titleMedium!.copyWith(
|
Text(
|
||||||
fontWeight: FontWeight.w400,
|
'Wall Light',
|
||||||
color: ColorsManager.blackColor,
|
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: () {
|
onTap: () {
|
||||||
showDialog(
|
showDialog<void>(
|
||||||
context: context,
|
context: context,
|
||||||
builder: (ctx) => BlocProvider.value(
|
builder: (ctx) => BlocProvider.value(
|
||||||
value: BlocProvider.of<TwoGangGlassSwitchBloc>(context),
|
value: BlocProvider.of<TwoGangGlassSwitchBloc>(context),
|
||||||
@ -185,13 +190,27 @@ class TwoGangGlassSwitchControlView extends StatelessWidget
|
|||||||
),
|
),
|
||||||
),
|
),
|
||||||
const Spacer(),
|
const Spacer(),
|
||||||
Text(
|
Column(
|
||||||
'Scheduling',
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
textAlign: TextAlign.center,
|
children: [
|
||||||
style: context.textTheme.titleMedium!.copyWith(
|
Text(
|
||||||
fontWeight: FontWeight.w400,
|
'Ceiling Light',
|
||||||
color: ColorsManager.blackColor,
|
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