mirror of
https://github.com/SyncrowIOT/syncrow-app.git
synced 2026-10-25 08:57:54 +00:00
water heater and timer and schedule ui and api ,
Circulate ui and Inching ui
This commit is contained in:
@@ -18,7 +18,8 @@ class CirculateWidget extends StatelessWidget {
|
||||
final Function(bool) onToggleStartEndTime;
|
||||
final Function(DateTime, bool) onTimeChanged;
|
||||
final Function(String) onDaySelected;
|
||||
|
||||
final Function()? endDuration;
|
||||
final Function()? startDuration;
|
||||
const CirculateWidget({
|
||||
Key? key,
|
||||
required this.isStartEndTime,
|
||||
@@ -29,6 +30,8 @@ class CirculateWidget extends StatelessWidget {
|
||||
required this.onToggleStartEndTime,
|
||||
required this.onTimeChanged,
|
||||
required this.onDaySelected,
|
||||
required this.endDuration,
|
||||
required this.startDuration,
|
||||
}) : super(key: key);
|
||||
|
||||
@override
|
||||
@@ -130,9 +133,7 @@ class CirculateWidget extends StatelessWidget {
|
||||
Column(
|
||||
children: [
|
||||
InkWell(
|
||||
onTap: () {
|
||||
|
||||
},
|
||||
onTap: startDuration,
|
||||
child: const Padding(
|
||||
padding: EdgeInsets.all(8.0),
|
||||
child: Row(
|
||||
@@ -150,9 +151,7 @@ class CirculateWidget extends StatelessWidget {
|
||||
),
|
||||
const Divider(color: ColorsManager.graysColor,),
|
||||
InkWell(
|
||||
onTap: () {
|
||||
|
||||
},
|
||||
onTap: endDuration,
|
||||
child: const Padding(
|
||||
padding: EdgeInsets.all(8.0),
|
||||
child: Row(
|
||||
|
||||
@@ -364,13 +364,21 @@ class WHTimerScheduleScreen extends StatelessWidget {
|
||||
waterHeaterBloc.createCirculate == true
|
||||
?
|
||||
CirculateWidget(
|
||||
endDuration: () {
|
||||
waterHeaterBloc.add(SelectTimeEvent(context: context, isEffective: false));
|
||||
},
|
||||
startDuration: () {
|
||||
waterHeaterBloc.add(SelectTimeEvent(context: context, isEffective: false));
|
||||
|
||||
},
|
||||
isStartEndTime: true,
|
||||
startTime: DateTime.now(),
|
||||
endTime: DateTime.now(),
|
||||
days: waterHeaterBloc.days,
|
||||
selectedDays: [],
|
||||
onToggleStartEndTime: (c) {},
|
||||
onTimeChanged: (x, f) {},
|
||||
onTimeChanged: (x, f) {
|
||||
},
|
||||
onDaySelected: (p0) {},
|
||||
):CirculateListView(
|
||||
listSchedule: waterHeaterBloc.listSchedule, // Pass the schedule list here
|
||||
|
||||
Reference in New Issue
Block a user