power_clamp

This commit is contained in:
mohammad
2024-10-22 10:13:12 +03:00
parent 5b1fd3bdd8
commit 9e678fddaf
2 changed files with 4 additions and 7 deletions

View File

@ -22,7 +22,6 @@ class PowerClampBloc extends Bloc<PowerClampEvent, PowerClampState> {
on<SelectDateEvent>(selectTimeOfLinePassword);
}
//SelectDateEvent
Timer? _timer;
DateTime? dateTime = DateTime.now();
String formattedDate = DateFormat('yyyy/MM/dd').format(DateTime.now());
@ -212,10 +211,9 @@ class PowerClampBloc extends Bloc<PowerClampEvent, PowerClampState> {
selectedDateTime.hour,
selectedDateTime.minute,
).millisecondsSinceEpoch ~/
1000; // Divide by 1000 to remove milliseconds
1000;
DateTime dateTime =
selectedDateTime; // Assuming this is your DateTime object
DateTime dateTime = selectedDateTime;
formattedDate = DateFormat('yyyy/MM/dd').format(dateTime);
emit(DateSelectedState());
}
@ -244,10 +242,10 @@ class PowerClampBloc extends Bloc<PowerClampEvent, PowerClampState> {
),
Text(
views[currentIndex],
style: TextStyle(fontSize: 15, fontWeight: FontWeight.w500),
style: const TextStyle(fontSize: 15, fontWeight: FontWeight.w500),
),
IconButton(
icon: Icon(Icons.arrow_right),
icon: const Icon(Icons.arrow_right),
onPressed: () {
setState(() {
switchView(1);

View File

@ -1,5 +1,4 @@
import 'package:flutter/material.dart';
import 'package:syncrow_app/features/devices/model/power_clamp_model.dart';
import 'package:syncrow_app/features/devices/view/widgets/power_clamp/power_info_card.dart';
import 'package:syncrow_app/features/shared_widgets/default_container.dart';
import 'package:syncrow_app/features/shared_widgets/text_widgets/body_large.dart';